修复id问题

master
郑明梁 2 years ago
parent 0d51bce1a3
commit 0d878f1d64

@ -1,5 +1,6 @@
package com.glxp.api.controller.thrsys;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.common.enums.ResultEnum;
@ -78,6 +79,7 @@ public class ThrDeptController {
thrDeptEntity.setPcode(pEntity.getPcode());
}
thrDeptEntity.setUpdateTime(new Date());
thrDeptEntity.setId(IdUtil.getSnowflakeNextId());
boolean b = thrDeptService.insertInvWarehouse(thrDeptEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);

@ -3,6 +3,7 @@ package com.glxp.api.controller.thrsys;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageInfo;
import com.glxp.api.annotation.AuthRuleAnnotation;
@ -179,6 +180,7 @@ public class ThrProductsController {
thrProductsEntity.setCreateUser(String.valueOf(customerService.getUserId()));
thrProductsEntity.setUpdateTime(new Date());
thrProductsEntity.setCreateTime(new Date());
thrProductsEntity.setId(IdUtil.getSnowflakeNextId());
thrProductsService.insertThrProducts(thrProductsEntity);
return ResultVOUtils.success();
}

@ -8,7 +8,7 @@ import java.util.Date;
@Data
public class ThrProductsResponse {
private Integer id;
private Long id;
private String code; //产品编码
private String name;
private String measname; //计量单位

@ -2,6 +2,7 @@ package com.glxp.api.service.thrsys.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@ -68,6 +69,7 @@ public class ThrBusTypeOriginServiceImpl extends ServiceImpl<ThrBusTypeOriginDao
public boolean insertBusOriginType(ThrBusTypeOriginEntity thrBusTypeOriginEntity) {
//设置创建信息
setUpdateInfo(thrBusTypeOriginEntity);
thrBusTypeOriginEntity.setId(IdUtil.getSnowflakeNextId());
return thrBusTypeOriginDao.insertBusOriginType(thrBusTypeOriginEntity);
}

@ -75,9 +75,10 @@
<insert id="insertBusOriginType" parameterType="com.glxp.api.entity.thrsys.ThrBusTypeOriginEntity">
replace
into thr_bustype_origin
(`name`, `action`, thirdSys, `enable`, inoutType, updateTime, remark, createUser, updateUser,
(id,`name`, `action`, thirdSys, `enable`, inoutType, updateTime, remark, createUser, updateUser,
createTime)
values (#{name},
values (#{id},
#{name},
#{action},
#{thirdSys},
#{enable},

@ -83,9 +83,10 @@
parameterType="com.glxp.api.entity.thrsys.ThrDeptEntity">
replace
INTO thr_dept
(pid, code, name, advanceType, isDefault,
(id,pid, code, name, advanceType, isDefault,
status, updateTime, remark, thirdSysFk)
values (
#{id},
#{pid},
#{code},
#{name},

@ -154,10 +154,11 @@
parameterType="com.glxp.api.entity.thrsys.ThrProductsEntity">
replace
INTO thr_products
(code, `name`, measname, spec, registerNo, manufactory,
(id,code, `name`, measname, spec, registerNo, manufactory,
cplb, flbm, qxlb, ybbm, sptm, tyshxydm, zczbhhzbapzbh, ylqxzcrbarmc, ylqxzcrbarywmc, cpms,
thirdSysFk, updateTime, supName, model, standard, qtbm, zczyxqz, remark, remark1, remark2, remark3,price,createUser,createTime,updateUser)
values (
#{id},
#{code},
#{name},
#{measname},

Loading…
Cancel
Save