feat(item): 新增 PkItem 实体及 CRUD 全套代码
新增 PkItem.java 实体、Mapper、Service、Controller 与 XML,并配置 MyBatisCodeHelper 生成规则,同时忽略 /src/test/ 目录
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -28,3 +28,4 @@ replay_pid*
|
|||||||
/target/
|
/target/
|
||||||
/AGENTS.md
|
/AGENTS.md
|
||||||
/.xcodemap/
|
/.xcodemap/
|
||||||
|
/src/test/
|
||||||
|
|||||||
BIN
.idea/.cache/.Apifox_Helper/.toolWindow.db
generated
BIN
.idea/.cache/.Apifox_Helper/.toolWindow.db
generated
Binary file not shown.
38
.idea/MyBatisCodeHelperDatasource.xml
generated
38
.idea/MyBatisCodeHelperDatasource.xml
generated
@@ -4,8 +4,44 @@
|
|||||||
<option name="projectProfile">
|
<option name="projectProfile">
|
||||||
<ProjectProfile>
|
<ProjectProfile>
|
||||||
<option name="controllerTemplateString" value=" #* @vtlvariable name="tableName" type="java.lang.String" *# #* @vtlvariable name="entityPackageName" type="java.lang.String" *# #* @vtlvariable name="entityClassName" type="java.lang.String" *# #* @vtlvariable name="servicePackageName" type="java.lang.String" *# #* @vtlvariable name="serviceInterfacePackage" type="java.lang.String" *# #* @vtlvariable name="serviceClassName" type="java.lang.String" *# #* @vtlvariable name="serviceInterfaceClassName" type="java.lang.String" *# #* @vtlvariable name="mapperPackageName" type="java.lang.String" *# #* @vtlvariable name="mapperClassName" type="java.lang.String" *# #* @vtlvariable name="controllerPackage" type="java.lang.String" *# #* @vtlvariable name="tableRemark" type="java.lang.String" *# #* @vtlvariable name="myDate" type="java.util.Date" *# #* @vtlvariable name="simpleDateFormat" type="java.text.SimpleDateFormat" *# package $!{controllerPackage}; import $!{entityPackageName}.$!{entityClassName}; ###set($realServiceName = $!{serviceClassName}+'Impl') import $!{servicePackageName}.$!{serviceClassName}; import org.springframework.web.bind.annotation.*; #set($serviceFirstLower = $!{serviceClassName.substring(0,1).toLowerCase()}+$!{serviceClassName.substring(1,$!{serviceClassName.length()})}) import org.springframework.beans.factory.annotation.Autowired; /** * $!{tableRemark}($!{tableName})表控制层 * * @author xxxxx */ @RestController @RequestMapping("/$!{tableName}") public class $!{entityClassName}Controller { /** * 服务对象 */ @Autowired private $!{serviceClassName} $!{serviceFirstLower}; /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @GetMapping("selectOne") public $!{entityClassName} selectOne(Integer id) { return $!{serviceFirstLower}.selectByPrimaryKey(id); } }" />
|
<option name="controllerTemplateString" value=" #* @vtlvariable name="tableName" type="java.lang.String" *# #* @vtlvariable name="entityPackageName" type="java.lang.String" *# #* @vtlvariable name="entityClassName" type="java.lang.String" *# #* @vtlvariable name="servicePackageName" type="java.lang.String" *# #* @vtlvariable name="serviceInterfacePackage" type="java.lang.String" *# #* @vtlvariable name="serviceClassName" type="java.lang.String" *# #* @vtlvariable name="serviceInterfaceClassName" type="java.lang.String" *# #* @vtlvariable name="mapperPackageName" type="java.lang.String" *# #* @vtlvariable name="mapperClassName" type="java.lang.String" *# #* @vtlvariable name="controllerPackage" type="java.lang.String" *# #* @vtlvariable name="tableRemark" type="java.lang.String" *# #* @vtlvariable name="myDate" type="java.util.Date" *# #* @vtlvariable name="simpleDateFormat" type="java.text.SimpleDateFormat" *# package $!{controllerPackage}; import $!{entityPackageName}.$!{entityClassName}; ###set($realServiceName = $!{serviceClassName}+'Impl') import $!{servicePackageName}.$!{serviceClassName}; import org.springframework.web.bind.annotation.*; #set($serviceFirstLower = $!{serviceClassName.substring(0,1).toLowerCase()}+$!{serviceClassName.substring(1,$!{serviceClassName.length()})}) import org.springframework.beans.factory.annotation.Autowired; /** * $!{tableRemark}($!{tableName})表控制层 * * @author xxxxx */ @RestController @RequestMapping("/$!{tableName}") public class $!{entityClassName}Controller { /** * 服务对象 */ @Autowired private $!{serviceClassName} $!{serviceFirstLower}; /** * 通过主键查询单条数据 * * @param id 主键 * @return 单条数据 */ @GetMapping("selectOne") public $!{entityClassName} selectOne(Integer id) { return $!{serviceFirstLower}.selectByPrimaryKey(id); } }" />
|
||||||
|
<option name="javaMapperPackage" value="vvpkassistant.item" />
|
||||||
|
<option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" />
|
||||||
|
<option name="javaModelPackage" value="vvpkassistant.item.model" />
|
||||||
|
<option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" />
|
||||||
|
<option name="lastDatabaseCrudChooseModuleName" value="vvPkAssistant" />
|
||||||
|
<option name="moduleNameToPackageAndPathMap">
|
||||||
|
<map>
|
||||||
|
<entry key="vvPkAssistant">
|
||||||
|
<value>
|
||||||
|
<UserPackageAndPathInfoByModule>
|
||||||
|
<option name="javaMapperPackage" value="vvpkassistant.item" />
|
||||||
|
<option name="javaMapperPath" value="$PROJECT_DIR$/src/main/java" />
|
||||||
|
<option name="javaModelPacakge" value="vvpkassistant.item.model" />
|
||||||
|
<option name="javaModelPath" value="$PROJECT_DIR$/src/main/java" />
|
||||||
|
<option name="javaServiceInterfacePath" value="$PROJECT_DIR$/src/main/java" />
|
||||||
|
<option name="javaServicePath" value="$PROJECT_DIR$/src/main/java" />
|
||||||
|
<option name="xmlPackage" value="mapper" />
|
||||||
|
<option name="xmlPath" value="$PROJECT_DIR$/src/main/resources" />
|
||||||
|
</UserPackageAndPathInfoByModule>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
|
</map>
|
||||||
|
</option>
|
||||||
<option name="tableGenerateConfigs">
|
<option name="tableGenerateConfigs">
|
||||||
<map>
|
<map>
|
||||||
|
<entry key="ruoyi-vue-pro:pk_item">
|
||||||
|
<value>
|
||||||
|
<TableGenerateConfig>
|
||||||
|
<option name="generatedKey" value="" />
|
||||||
|
<option name="javaModelName" value="PkItem" />
|
||||||
|
<option name="moduleName" value="vvPkAssistant" />
|
||||||
|
<option name="mybatisplusIdType" value="INPUT" />
|
||||||
|
<option name="sequenceColumn" value="" />
|
||||||
|
<option name="sequenceId" value="" />
|
||||||
|
<option name="useActualColumnName" value="false" />
|
||||||
|
</TableGenerateConfig>
|
||||||
|
</value>
|
||||||
|
</entry>
|
||||||
<entry key="vv_assistant:user">
|
<entry key="vv_assistant:user">
|
||||||
<value>
|
<value>
|
||||||
<TableGenerateConfig>
|
<TableGenerateConfig>
|
||||||
@@ -19,6 +55,8 @@
|
|||||||
</entry>
|
</entry>
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
|
<option name="xmlMapperPackage" value="mapper" />
|
||||||
|
<option name="xmlMapperPath" value="$PROJECT_DIR$/src/main/resources" />
|
||||||
</ProjectProfile>
|
</ProjectProfile>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|||||||
24
src/main/java/vvpkassistant/controller/PkItemController.java
Normal file
24
src/main/java/vvpkassistant/controller/PkItemController.java
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
package vvpkassistant.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import vvpkassistant.Data.ResponseData;
|
||||||
|
import vvpkassistant.item.model.PkItem;
|
||||||
|
import vvpkassistant.item.service.PkItemService;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("pkItem")
|
||||||
|
public class PkItemController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PkItemService pkItemService;
|
||||||
|
|
||||||
|
@GetMapping("list")
|
||||||
|
public ResponseData<List<PkItem>> list() {
|
||||||
|
return ResponseData.success(pkItemService.selectItemList());
|
||||||
|
}
|
||||||
|
}
|
||||||
27
src/main/java/vvpkassistant/item/PkItemMapper.java
Normal file
27
src/main/java/vvpkassistant/item/PkItemMapper.java
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package vvpkassistant.item;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import vvpkassistant.item.model.PkItem;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author: ziin
|
||||||
|
* @date: 2026/3/27 10:13
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface PkItemMapper {
|
||||||
|
int deleteByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
int insert(PkItem record);
|
||||||
|
|
||||||
|
int insertSelective(PkItem record);
|
||||||
|
|
||||||
|
PkItem selectByPrimaryKey(Long id);
|
||||||
|
|
||||||
|
List<PkItem> selectItemList();
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(PkItem record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(PkItem record);
|
||||||
|
}
|
||||||
78
src/main/java/vvpkassistant/item/model/PkItem.java
Normal file
78
src/main/java/vvpkassistant/item/model/PkItem.java
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
package vvpkassistant.item.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author: ziin
|
||||||
|
* @date: 2026/3/27 10:13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PkItem {
|
||||||
|
/**
|
||||||
|
* 主键Id
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 套餐名称
|
||||||
|
*/
|
||||||
|
private String itemName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 套餐价格
|
||||||
|
*/
|
||||||
|
private Integer itemPrice;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 套餐描述
|
||||||
|
*/
|
||||||
|
private String itemDesc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能
|
||||||
|
*/
|
||||||
|
private String itemFunction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时长
|
||||||
|
*/
|
||||||
|
private Integer itemDuration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架
|
||||||
|
*/
|
||||||
|
private Integer itemStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private String creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private String updater;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
private Boolean deleted;
|
||||||
|
|
||||||
|
}
|
||||||
13
src/main/java/vvpkassistant/item/service/PkItemService.java
Normal file
13
src/main/java/vvpkassistant/item/service/PkItemService.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package vvpkassistant.item.service;
|
||||||
|
|
||||||
|
import vvpkassistant.item.model.PkItem;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author: ziin
|
||||||
|
* @date: 2026/3/27 10:13
|
||||||
|
*/
|
||||||
|
public interface PkItemService {
|
||||||
|
List<PkItem> selectItemList();
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package vvpkassistant.item.service;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import vvpkassistant.item.PkItemMapper;
|
||||||
|
import vvpkassistant.item.model.PkItem;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @author: ziin
|
||||||
|
* @date: 2026/3/27 10:13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PkItemServiceImpl implements PkItemService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private PkItemMapper pkItemMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PkItem> selectItemList() {
|
||||||
|
return pkItemMapper.selectItemList();
|
||||||
|
}
|
||||||
|
}
|
||||||
206
src/main/resources/mapper/PkItemMapper.xml
Normal file
206
src/main/resources/mapper/PkItemMapper.xml
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="vvpkassistant.item.PkItemMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="vvpkassistant.item.model.PkItem">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
<!--@Table pk_item-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="item_name" jdbcType="VARCHAR" property="itemName" />
|
||||||
|
<result column="item_price" jdbcType="INTEGER" property="itemPrice" />
|
||||||
|
<result column="item_desc" jdbcType="VARCHAR" property="itemDesc" />
|
||||||
|
<result column="item_function" jdbcType="VARCHAR" property="itemFunction" />
|
||||||
|
<result column="item_duration" jdbcType="INTEGER" property="itemDuration" />
|
||||||
|
<result column="item_status" jdbcType="INTEGER" property="itemStatus" />
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||||
|
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="updater" jdbcType="VARCHAR" property="updater" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
id, item_name, item_price, item_desc, item_function, item_duration, item_status,
|
||||||
|
remark, creator, create_time, updater, update_time, deleted
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from pk_item
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<select id="selectItemList" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
from pk_item
|
||||||
|
where deleted = 0
|
||||||
|
and
|
||||||
|
item_status = 0
|
||||||
|
order by id desc
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
delete from pk_item
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" parameterType="vvpkassistant.item.model.PkItem">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into pk_item (id, item_name, item_price,
|
||||||
|
item_desc, item_function, item_duration,
|
||||||
|
item_status, remark, creator,
|
||||||
|
create_time, updater, update_time,
|
||||||
|
deleted)
|
||||||
|
values (#{id,jdbcType=BIGINT}, #{itemName,jdbcType=VARCHAR}, #{itemPrice,jdbcType=INTEGER},
|
||||||
|
#{itemDesc,jdbcType=VARCHAR}, #{itemFunction,jdbcType=VARCHAR}, #{itemDuration,jdbcType=INTEGER},
|
||||||
|
#{itemStatus,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
|
||||||
|
#{createTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
#{deleted,jdbcType=BIT})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" parameterType="vvpkassistant.item.model.PkItem">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
insert into pk_item
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
id,
|
||||||
|
</if>
|
||||||
|
<if test="itemName != null">
|
||||||
|
item_name,
|
||||||
|
</if>
|
||||||
|
<if test="itemPrice != null">
|
||||||
|
item_price,
|
||||||
|
</if>
|
||||||
|
<if test="itemDesc != null">
|
||||||
|
item_desc,
|
||||||
|
</if>
|
||||||
|
<if test="itemFunction != null">
|
||||||
|
item_function,
|
||||||
|
</if>
|
||||||
|
<if test="itemDuration != null">
|
||||||
|
item_duration,
|
||||||
|
</if>
|
||||||
|
<if test="itemStatus != null">
|
||||||
|
item_status,
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
creator,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="updater != null">
|
||||||
|
updater,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="deleted != null">
|
||||||
|
deleted,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">
|
||||||
|
#{id,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="itemName != null">
|
||||||
|
#{itemName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="itemPrice != null">
|
||||||
|
#{itemPrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="itemDesc != null">
|
||||||
|
#{itemDesc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="itemFunction != null">
|
||||||
|
#{itemFunction,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="itemDuration != null">
|
||||||
|
#{itemDuration,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="itemStatus != null">
|
||||||
|
#{itemStatus,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
#{creator,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null">
|
||||||
|
#{updater,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="deleted != null">
|
||||||
|
#{deleted,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="vvpkassistant.item.model.PkItem">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update pk_item
|
||||||
|
<set>
|
||||||
|
<if test="itemName != null">
|
||||||
|
item_name = #{itemName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="itemPrice != null">
|
||||||
|
item_price = #{itemPrice,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="itemDesc != null">
|
||||||
|
item_desc = #{itemDesc,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="itemFunction != null">
|
||||||
|
item_function = #{itemFunction,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="itemDuration != null">
|
||||||
|
item_duration = #{itemDuration,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="itemStatus != null">
|
||||||
|
item_status = #{itemStatus,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="creator != null">
|
||||||
|
creator = #{creator,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updater != null">
|
||||||
|
updater = #{updater,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="deleted != null">
|
||||||
|
deleted = #{deleted,jdbcType=BIT},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="vvpkassistant.item.model.PkItem">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update pk_item
|
||||||
|
set item_name = #{itemName,jdbcType=VARCHAR},
|
||||||
|
item_price = #{itemPrice,jdbcType=INTEGER},
|
||||||
|
item_desc = #{itemDesc,jdbcType=VARCHAR},
|
||||||
|
item_function = #{itemFunction,jdbcType=VARCHAR},
|
||||||
|
item_duration = #{itemDuration,jdbcType=INTEGER},
|
||||||
|
item_status = #{itemStatus,jdbcType=INTEGER},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
creator = #{creator,jdbcType=VARCHAR},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
updater = #{updater,jdbcType=VARCHAR},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
deleted = #{deleted,jdbcType=BIT}
|
||||||
|
where id = #{id,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
Reference in New Issue
Block a user