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 com.ruoyi.common.annotation.Anonymous;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; 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.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
@ -20,9 +27,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
* item2Controller * item2Controller
* *
* @author ruoyi * @author ruoyi
* @date 2024-12-01 * @date 2024-12-04
*/ */
@CrossOrigin
@RestController @RestController
@RequestMapping("/system/item2") @RequestMapping("/system/item2")
public class Item2Controller extends BaseController public class Item2Controller extends BaseController

View File

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

View File

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

View File

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

View File

@ -11,7 +11,7 @@ import com.ruoyi.system.service.IItem2Service;
* item2Service业务层处理 * item2Service业务层处理
* *
* @author ruoyi * @author ruoyi
* @date 2024-12-01 * @date 2024-12-04
*/ */
@Service @Service
public class Item2ServiceImpl implements IItem2Service 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="idcard" column="idcard" />
<result property="telephone" column="telephone" /> <result property="telephone" column="telephone" />
<result property="yiqing" column="yiqing" /> <result property="yiqing" column="yiqing" />
<result property="dataPlace" column="data_place" />
</resultMap> </resultMap>
<sql id="selectItem2Vo"> <sql id="selectItem2Vo">
select id, name, idcard, telephone, yiqing from item2 select id, name, idcard, telephone, yiqing, data_place from item2
</sql> </sql>
<select id="selectItem2List" parameterType="Item2" resultMap="Item2Result"> <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="idcard != null and idcard != ''"> and idcard = #{idcard}</if>
<if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if> <if test="telephone != null and telephone != ''"> and telephone = #{telephone}</if>
<if test="yiqing != null and yiqing != ''"> and yiqing = #{yiqing}</if> <if test="yiqing != null and yiqing != ''"> and yiqing = #{yiqing}</if>
<if test="dataPlace != null and dataPlace != ''"> and data_place = #{dataPlace}</if>
</where> </where>
</select> </select>
@ -38,12 +40,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idcard != null">idcard,</if> <if test="idcard != null">idcard,</if>
<if test="telephone != null">telephone,</if> <if test="telephone != null">telephone,</if>
<if test="yiqing != null">yiqing,</if> <if test="yiqing != null">yiqing,</if>
<if test="dataPlace != null">data_place,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if> <if test="name != null">#{name},</if>
<if test="idcard != null">#{idcard},</if> <if test="idcard != null">#{idcard},</if>
<if test="telephone != null">#{telephone},</if> <if test="telephone != null">#{telephone},</if>
<if test="yiqing != null">#{yiqing},</if> <if test="yiqing != null">#{yiqing},</if>
<if test="dataPlace != null">#{dataPlace},</if>
</trim> </trim>
</insert> </insert>
@ -54,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="idcard != null">idcard = #{idcard},</if> <if test="idcard != null">idcard = #{idcard},</if>
<if test="telephone != null">telephone = #{telephone},</if> <if test="telephone != null">telephone = #{telephone},</if>
<if test="yiqing != null">yiqing = #{yiqing},</if> <if test="yiqing != null">yiqing = #{yiqing},</if>
<if test="dataPlace != null">data_place = #{dataPlace},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>