This commit is contained in:
adan 2024-12-04 23:36:02 +08:00
parent 65943ec0ad
commit 665209c591
6 changed files with 34 additions and 9 deletions

View File

@ -6,7 +6,14 @@ import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.annotation.Anonymous;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
@ -20,9 +27,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
* item2Controller
*
* @author ruoyi
* @date 2024-12-01
* @date 2024-12-04
*/
@CrossOrigin
@RestController
@RequestMapping("/system/item2")
public class Item2Controller extends BaseController
@ -33,7 +39,7 @@ public class Item2Controller extends BaseController
/**
* 查询item2列表
*/
/* @PreAuthorize("@ss.hasPermi('system:item2:list')")*/
/* @PreAuthorize("@ss.hasPermi('system:item2:list')")*/
@Anonymous
@GetMapping("/list")
public TableDataInfo list(Item2 item2)

View File

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* item2对象 item2
*
* @author ruoyi
* @date 2024-12-01
* @date 2024-12-04
*/
public class Item2 extends BaseEntity
{
@ -34,6 +34,10 @@ public class Item2 extends BaseEntity
@Excel(name = "yiqing")
private String yiqing;
/** data_place */
@Excel(name = "data_place")
private String dataPlace;
public void setId(Integer id)
{
this.id = id;
@ -79,6 +83,15 @@ public class Item2 extends BaseEntity
{
return yiqing;
}
public void setDataPlace(String dataPlace)
{
this.dataPlace = dataPlace;
}
public String getDataPlace()
{
return dataPlace;
}
@Override
public String toString() {
@ -88,6 +101,7 @@ public class Item2 extends BaseEntity
.append("idcard", getIdcard())
.append("telephone", getTelephone())
.append("yiqing", getYiqing())
.append("dataPlace", getDataPlace())
.toString();
}
}

View File

@ -7,7 +7,7 @@ import com.ruoyi.system.domain.Item2;
* item2Mapper接口
*
* @author ruoyi
* @date 2024-12-01
* @date 2024-12-04
*/
public interface Item2Mapper
{

View File

@ -7,7 +7,7 @@ import com.ruoyi.system.domain.Item2;
* item2Service接口
*
* @author ruoyi
* @date 2024-12-01
* @date 2024-12-04
*/
public interface IItem2Service
{

View File

@ -11,7 +11,7 @@ import com.ruoyi.system.service.IItem2Service;
* item2Service业务层处理
*
* @author ruoyi
* @date 2024-12-01
* @date 2024-12-04
*/
@Service
public class Item2ServiceImpl implements IItem2Service

View File

@ -10,10 +10,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="idcard" column="idcard" />
<result property="telephone" column="telephone" />
<result property="yiqing" column="yiqing" />
<result property="dataPlace" column="data_place" />
</resultMap>
<sql id="selectItem2Vo">
select id, name, idcard, telephone, yiqing from item2
select id, name, idcard, telephone, yiqing, data_place from item2
</sql>
<select id="selectItem2List" parameterType="Item2" resultMap="Item2Result">
@ -23,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idcard != null and idcard != ''"> and idcard = #{idcard}</if>
<if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
<if test="yiqing != null and yiqing != ''"> and yiqing = #{yiqing}</if>
<if test="dataPlace != null and dataPlace != ''"> and data_place = #{dataPlace}</if>
</where>
</select>
@ -38,12 +40,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idcard != null">idcard,</if>
<if test="telephone != null">telephone,</if>
<if test="yiqing != null">yiqing,</if>
<if test="dataPlace != null">data_place,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="idcard != null">#{idcard},</if>
<if test="telephone != null">#{telephone},</if>
<if test="yiqing != null">#{yiqing},</if>
<if test="dataPlace != null">#{dataPlace},</if>
</trim>
</insert>
@ -54,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idcard != null">idcard = #{idcard},</if>
<if test="telephone != null">telephone = #{telephone},</if>
<if test="yiqing != null">yiqing = #{yiqing},</if>
<if test="dataPlace != null">data_place = #{dataPlace},</if>
</trim>
where id = #{id}
</update>