acc_card
This commit is contained in:
parent
e4473d5c8a
commit
04d98c266b
|
|
@ -0,0 +1,119 @@
|
|||
package com.bonus.canteen.core.account.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.canteen.core.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.canteen.core.account.domain.AccCard;
|
||||
import com.bonus.canteen.core.account.service.IAccCardService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 人员卡片资料Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-20
|
||||
*/
|
||||
@Api(tags = "人员卡片资料接口")
|
||||
@RestController
|
||||
@RequestMapping("/acc_card")
|
||||
public class AccCardController extends BaseController {
|
||||
@Autowired
|
||||
private IAccCardService accCardService;
|
||||
|
||||
/**
|
||||
* 查询人员卡片资料列表
|
||||
*/
|
||||
@ApiOperation(value = "查询人员卡片资料列表")
|
||||
//@RequiresPermissions("account:card:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AccCard accCard) {
|
||||
startPage();
|
||||
List<AccCard> list = accCardService.selectAccCardList(accCard);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出人员卡片资料列表
|
||||
*/
|
||||
@ApiOperation(value = "导出人员卡片资料列表")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("account:card:export")
|
||||
@SysLog(title = "人员卡片资料", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出人员卡片资料")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AccCard accCard) {
|
||||
List<AccCard> list = accCardService.selectAccCardList(accCard);
|
||||
ExcelUtil<AccCard> util = new ExcelUtil<AccCard>(AccCard.class);
|
||||
util.exportExcel(response, list, "人员卡片资料数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员卡片资料详细信息
|
||||
*/
|
||||
@ApiOperation(value = "获取人员卡片资料详细信息")
|
||||
//@RequiresPermissions("account:card:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(accCardService.selectAccCardById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员卡片资料
|
||||
*/
|
||||
@ApiOperation(value = "新增人员卡片资料")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("account:card:add")
|
||||
@SysLog(title = "人员卡片资料", businessType = OperaType.INSERT, logType = 1,module = "仓储管理->新增人员卡片资料")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AccCard accCard) {
|
||||
try {
|
||||
return toAjax(accCardService.insertAccCard(accCard));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员卡片资料
|
||||
*/
|
||||
@ApiOperation(value = "修改人员卡片资料")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("account:card:edit")
|
||||
@SysLog(title = "人员卡片资料", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改人员卡片资料")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody AccCard accCard) {
|
||||
try {
|
||||
return toAjax(accCardService.updateAccCard(accCard));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员卡片资料
|
||||
*/
|
||||
@ApiOperation(value = "删除人员卡片资料")
|
||||
//@PreventRepeatSubmit
|
||||
//@RequiresPermissions("account:card:remove")
|
||||
@SysLog(title = "人员卡片资料", businessType = OperaType.DELETE, logType = 1,module = "仓储管理->删除人员卡片资料")
|
||||
@PostMapping("/del/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(accCardService.deleteAccCardByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
package com.bonus.canteen.core.account.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 人员卡片资料对象 acc_card
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-20
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class AccCard extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键自增 */
|
||||
private Long id;
|
||||
|
||||
/** 人员id */
|
||||
@Excel(name = "人员id")
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private Long userId;
|
||||
|
||||
/** 账户id */
|
||||
@Excel(name = "账户id")
|
||||
@ApiModelProperty(value = "账户id")
|
||||
private Long accId;
|
||||
|
||||
/** 卡号 */
|
||||
@Excel(name = "卡号")
|
||||
@ApiModelProperty(value = "卡号")
|
||||
private Long cardNum;
|
||||
|
||||
/** 卡序列号 物理卡号 */
|
||||
@Excel(name = "卡序列号 物理卡号")
|
||||
@ApiModelProperty(value = "卡序列号 物理卡号")
|
||||
private String serialNum;
|
||||
|
||||
/** 餐卡性质(临时卡、编制卡) */
|
||||
@Excel(name = "餐卡性质", readConverterExp = "临=时卡、编制卡")
|
||||
private String cardNature;
|
||||
|
||||
/** 卡类型 */
|
||||
@Excel(name = "卡类型")
|
||||
@ApiModelProperty(value = "卡类型")
|
||||
private Long cardType;
|
||||
|
||||
/** 卡状态 1-正常 4-挂失 */
|
||||
@Excel(name = "卡状态 1-正常 4-挂失")
|
||||
@ApiModelProperty(value = "卡状态 1-正常 4-挂失")
|
||||
private Long cardStatus;
|
||||
|
||||
/** 押金 单位分 */
|
||||
@Excel(name = "押金 单位分")
|
||||
@ApiModelProperty(value = "押金 单位分")
|
||||
private Long deposit;
|
||||
|
||||
/** 工本费 单位分 */
|
||||
@Excel(name = "工本费 单位分")
|
||||
@ApiModelProperty(value = "工本费 单位分")
|
||||
private Long productCost;
|
||||
|
||||
/** 待缴工本费金额 */
|
||||
@Excel(name = "待缴工本费金额")
|
||||
@ApiModelProperty(value = "待缴工本费金额")
|
||||
private Long pendProductCost;
|
||||
|
||||
/** 卡片有效期 */
|
||||
@ApiModelProperty(value = "卡片有效期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "卡片有效期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date validityDate;
|
||||
|
||||
/** 卡面号 */
|
||||
@Excel(name = "卡面号")
|
||||
@ApiModelProperty(value = "卡面号")
|
||||
private String cardFaceNum;
|
||||
|
||||
/** 乐观锁 */
|
||||
@Excel(name = "乐观锁")
|
||||
@ApiModelProperty(value = "乐观锁")
|
||||
private Long revision;
|
||||
|
||||
/** 预留字段1 */
|
||||
@Excel(name = "预留字段1")
|
||||
@ApiModelProperty(value = "预留字段1")
|
||||
private String reserved1;
|
||||
|
||||
/** 预留字段2 */
|
||||
@Excel(name = "预留字段2")
|
||||
@ApiModelProperty(value = "预留字段2")
|
||||
private String reserved2;
|
||||
|
||||
/** 预留字段3 */
|
||||
@Excel(name = "预留字段3")
|
||||
@ApiModelProperty(value = "预留字段3")
|
||||
private String reserved3;
|
||||
|
||||
/** 三方卡号 */
|
||||
@Excel(name = "三方卡号")
|
||||
@ApiModelProperty(value = "三方卡号")
|
||||
private String thirdSerialNum;
|
||||
|
||||
/** 发卡来源 */
|
||||
@Excel(name = "发卡来源")
|
||||
@ApiModelProperty(value = "发卡来源")
|
||||
private String cardSourceType;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.bonus.canteen.core.account.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.canteen.core.account.domain.AccCard;
|
||||
|
||||
/**
|
||||
* 人员卡片资料Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-20
|
||||
*/
|
||||
public interface AccCardMapper {
|
||||
/**
|
||||
* 查询人员卡片资料
|
||||
*
|
||||
* @param id 人员卡片资料主键
|
||||
* @return 人员卡片资料
|
||||
*/
|
||||
public AccCard selectAccCardById(Long id);
|
||||
|
||||
/**
|
||||
* 查询人员卡片资料列表
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 人员卡片资料集合
|
||||
*/
|
||||
public List<AccCard> selectAccCardList(AccCard accCard);
|
||||
|
||||
/**
|
||||
* 新增人员卡片资料
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAccCard(AccCard accCard);
|
||||
|
||||
/**
|
||||
* 修改人员卡片资料
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAccCard(AccCard accCard);
|
||||
|
||||
/**
|
||||
* 删除人员卡片资料
|
||||
*
|
||||
* @param id 人员卡片资料主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccCardById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除人员卡片资料
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccCardByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.bonus.canteen.core.account.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.canteen.core.account.domain.AccCard;
|
||||
|
||||
/**
|
||||
* 人员卡片资料Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-20
|
||||
*/
|
||||
public interface IAccCardService {
|
||||
/**
|
||||
* 查询人员卡片资料
|
||||
*
|
||||
* @param id 人员卡片资料主键
|
||||
* @return 人员卡片资料
|
||||
*/
|
||||
public AccCard selectAccCardById(Long id);
|
||||
|
||||
/**
|
||||
* 查询人员卡片资料列表
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 人员卡片资料集合
|
||||
*/
|
||||
public List<AccCard> selectAccCardList(AccCard accCard);
|
||||
|
||||
/**
|
||||
* 新增人员卡片资料
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAccCard(AccCard accCard);
|
||||
|
||||
/**
|
||||
* 修改人员卡片资料
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAccCard(AccCard accCard);
|
||||
|
||||
/**
|
||||
* 批量删除人员卡片资料
|
||||
*
|
||||
* @param ids 需要删除的人员卡片资料主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccCardByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除人员卡片资料信息
|
||||
*
|
||||
* @param id 人员卡片资料主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAccCardById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
package com.bonus.canteen.core.account.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.canteen.core.account.mapper.AccCardMapper;
|
||||
import com.bonus.canteen.core.account.domain.AccCard;
|
||||
import com.bonus.canteen.core.account.service.IAccCardService;
|
||||
|
||||
/**
|
||||
* 人员卡片资料Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2025-04-20
|
||||
*/
|
||||
@Service
|
||||
public class AccCardServiceImpl implements IAccCardService {
|
||||
@Autowired
|
||||
private AccCardMapper accCardMapper;
|
||||
|
||||
/**
|
||||
* 查询人员卡片资料
|
||||
*
|
||||
* @param id 人员卡片资料主键
|
||||
* @return 人员卡片资料
|
||||
*/
|
||||
@Override
|
||||
public AccCard selectAccCardById(Long id) {
|
||||
return accCardMapper.selectAccCardById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员卡片资料列表
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 人员卡片资料
|
||||
*/
|
||||
@Override
|
||||
public List<AccCard> selectAccCardList(AccCard accCard) {
|
||||
return accCardMapper.selectAccCardList(accCard);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员卡片资料
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAccCard(AccCard accCard) {
|
||||
accCard.setCreateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return accCardMapper.insertAccCard(accCard);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员卡片资料
|
||||
*
|
||||
* @param accCard 人员卡片资料
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAccCard(AccCard accCard) {
|
||||
accCard.setUpdateTime(DateUtils.getNowDate());
|
||||
try {
|
||||
return accCardMapper.updateAccCard(accCard);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除人员卡片资料
|
||||
*
|
||||
* @param ids 需要删除的人员卡片资料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAccCardByIds(Long[] ids) {
|
||||
return accCardMapper.deleteAccCardByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员卡片资料信息
|
||||
*
|
||||
* @param id 人员卡片资料主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAccCardById(Long id) {
|
||||
return accCardMapper.deleteAccCardById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
<?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="com.bonus.canteen.core.account.mapper.AccCardMapper">
|
||||
<resultMap type="com.bonus.canteen.core.account.domain.AccCard" id="AccCardResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="accId" column="acc_id" />
|
||||
<result property="cardNum" column="card_num" />
|
||||
<result property="serialNum" column="serial_num" />
|
||||
<result property="cardNature" column="card_nature" />
|
||||
<result property="cardType" column="card_type" />
|
||||
<result property="cardStatus" column="card_status" />
|
||||
<result property="deposit" column="deposit" />
|
||||
<result property="productCost" column="product_cost" />
|
||||
<result property="pendProductCost" column="pend_product_cost" />
|
||||
<result property="validityDate" column="validity_date" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="cardFaceNum" column="card_face_num" />
|
||||
<result property="revision" column="revision" />
|
||||
<result property="reserved1" column="reserved1" />
|
||||
<result property="reserved2" column="reserved2" />
|
||||
<result property="reserved3" column="reserved3" />
|
||||
<result property="thirdSerialNum" column="third_serial_num" />
|
||||
<result property="cardSourceType" column="card_source_type" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAccCardVo">
|
||||
select id, user_id, acc_id, card_num, serial_num, card_nature, card_type, card_status, deposit, product_cost, pend_product_cost, validity_date, remark, card_face_num, revision, reserved1, reserved2, reserved3, third_serial_num, card_source_type, create_by, create_time, update_by, update_time from acc_card
|
||||
</sql>
|
||||
|
||||
<select id="selectAccCardList" parameterType="com.bonus.canteen.core.account.domain.AccCard" resultMap="AccCardResult">
|
||||
<include refid="selectAccCardVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="accId != null "> and acc_id = #{accId}</if>
|
||||
<if test="cardNum != null "> and card_num = #{cardNum}</if>
|
||||
<if test="serialNum != null and serialNum != ''"> and serial_num = #{serialNum}</if>
|
||||
<if test="cardNature != null and cardNature != ''"> and card_nature = #{cardNature}</if>
|
||||
<if test="cardType != null "> and card_type = #{cardType}</if>
|
||||
<if test="cardStatus != null "> and card_status = #{cardStatus}</if>
|
||||
<if test="deposit != null "> and deposit = #{deposit}</if>
|
||||
<if test="productCost != null "> and product_cost = #{productCost}</if>
|
||||
<if test="pendProductCost != null "> and pend_product_cost = #{pendProductCost}</if>
|
||||
<if test="validityDate != null "> and validity_date = #{validityDate}</if>
|
||||
<if test="cardFaceNum != null and cardFaceNum != ''"> and card_face_num = #{cardFaceNum}</if>
|
||||
<if test="revision != null "> and revision = #{revision}</if>
|
||||
<if test="reserved1 != null and reserved1 != ''"> and reserved1 = #{reserved1}</if>
|
||||
<if test="reserved2 != null and reserved2 != ''"> and reserved2 = #{reserved2}</if>
|
||||
<if test="reserved3 != null and reserved3 != ''"> and reserved3 = #{reserved3}</if>
|
||||
<if test="thirdSerialNum != null and thirdSerialNum != ''"> and third_serial_num = #{thirdSerialNum}</if>
|
||||
<if test="cardSourceType != null and cardSourceType != ''"> and card_source_type = #{cardSourceType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAccCardById" parameterType="Long" resultMap="AccCardResult">
|
||||
<include refid="selectAccCardVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertAccCard" parameterType="com.bonus.canteen.core.account.domain.AccCard" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into acc_card
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="accId != null">acc_id,</if>
|
||||
<if test="cardNum != null">card_num,</if>
|
||||
<if test="serialNum != null and serialNum != ''">serial_num,</if>
|
||||
<if test="cardNature != null">card_nature,</if>
|
||||
<if test="cardType != null">card_type,</if>
|
||||
<if test="cardStatus != null">card_status,</if>
|
||||
<if test="deposit != null">deposit,</if>
|
||||
<if test="productCost != null">product_cost,</if>
|
||||
<if test="pendProductCost != null">pend_product_cost,</if>
|
||||
<if test="validityDate != null">validity_date,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="cardFaceNum != null">card_face_num,</if>
|
||||
<if test="revision != null">revision,</if>
|
||||
<if test="reserved1 != null">reserved1,</if>
|
||||
<if test="reserved2 != null">reserved2,</if>
|
||||
<if test="reserved3 != null">reserved3,</if>
|
||||
<if test="thirdSerialNum != null">third_serial_num,</if>
|
||||
<if test="cardSourceType != null">card_source_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="accId != null">#{accId},</if>
|
||||
<if test="cardNum != null">#{cardNum},</if>
|
||||
<if test="serialNum != null and serialNum != ''">#{serialNum},</if>
|
||||
<if test="cardNature != null">#{cardNature},</if>
|
||||
<if test="cardType != null">#{cardType},</if>
|
||||
<if test="cardStatus != null">#{cardStatus},</if>
|
||||
<if test="deposit != null">#{deposit},</if>
|
||||
<if test="productCost != null">#{productCost},</if>
|
||||
<if test="pendProductCost != null">#{pendProductCost},</if>
|
||||
<if test="validityDate != null">#{validityDate},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="cardFaceNum != null">#{cardFaceNum},</if>
|
||||
<if test="revision != null">#{revision},</if>
|
||||
<if test="reserved1 != null">#{reserved1},</if>
|
||||
<if test="reserved2 != null">#{reserved2},</if>
|
||||
<if test="reserved3 != null">#{reserved3},</if>
|
||||
<if test="thirdSerialNum != null">#{thirdSerialNum},</if>
|
||||
<if test="cardSourceType != null">#{cardSourceType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAccCard" parameterType="com.bonus.canteen.core.account.domain.AccCard">
|
||||
update acc_card
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="accId != null">acc_id = #{accId},</if>
|
||||
<if test="cardNum != null">card_num = #{cardNum},</if>
|
||||
<if test="serialNum != null and serialNum != ''">serial_num = #{serialNum},</if>
|
||||
<if test="cardNature != null">card_nature = #{cardNature},</if>
|
||||
<if test="cardType != null">card_type = #{cardType},</if>
|
||||
<if test="cardStatus != null">card_status = #{cardStatus},</if>
|
||||
<if test="deposit != null">deposit = #{deposit},</if>
|
||||
<if test="productCost != null">product_cost = #{productCost},</if>
|
||||
<if test="pendProductCost != null">pend_product_cost = #{pendProductCost},</if>
|
||||
<if test="validityDate != null">validity_date = #{validityDate},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="cardFaceNum != null">card_face_num = #{cardFaceNum},</if>
|
||||
<if test="revision != null">revision = #{revision},</if>
|
||||
<if test="reserved1 != null">reserved1 = #{reserved1},</if>
|
||||
<if test="reserved2 != null">reserved2 = #{reserved2},</if>
|
||||
<if test="reserved3 != null">reserved3 = #{reserved3},</if>
|
||||
<if test="thirdSerialNum != null">third_serial_num = #{thirdSerialNum},</if>
|
||||
<if test="cardSourceType != null">card_source_type = #{cardSourceType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAccCardById" parameterType="Long">
|
||||
delete from acc_card where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAccCardByIds" parameterType="String">
|
||||
delete from acc_card where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue