diff --git a/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java b/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java index 5fc5b7c..277e482 100644 --- a/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java +++ b/src/main/java/com/glxp/udi/admin/controller/info/DeviceKeyController.java @@ -1,7 +1,7 @@ package com.glxp.udi.admin.controller.info; import cn.hutool.core.util.StrUtil; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.glxp.udi.admin.common.res.BaseResponse; import com.glxp.udi.admin.entity.auth.AuthAdmin; import com.glxp.udi.admin.entity.info.CompanyEntity; @@ -39,7 +39,7 @@ public class DeviceKeyController { @GetMapping("sale/device/registerList") public BaseResponse registerList(FilterDeviceKeyRequest filterDeviceKeyRequest) { - Page page = deviceKeyService.findDeviceKeyResponse(filterDeviceKeyRequest); + IPage page = deviceKeyService.findDeviceKeyResponse(filterDeviceKeyRequest); PageSimpleResponse pageSimpleResponse = new PageSimpleResponse<>(); pageSimpleResponse.setTotal(page.getTotal()); pageSimpleResponse.setList(page.getRecords()); diff --git a/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java b/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java index d427c88..5fbd689 100644 --- a/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java +++ b/src/main/java/com/glxp/udi/admin/controller/inventory/InvWarehouseController.java @@ -155,8 +155,8 @@ public class InvWarehouseController { invWarehouseEntity.setPid(0); // 默认设置 FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); filterInvWarehouseRequest.setPid(invWarehouseEntity.getPid()); - InvWarehouseEntity codeEntity = invWarehouseService.selectMaxCode(filterInvWarehouseRequest); - invWarehouseEntity.setCode(Integer.parseInt(codeEntity.getCode()) + 1 + ""); + String maxCode = invWarehouseService.selectMaxCode(filterInvWarehouseRequest); + invWarehouseEntity.setCode(Integer.parseInt(maxCode) + 1 + ""); if (null == invWarehouseEntity.getLevel() || invWarehouseEntity.getLevel() == 1) { invWarehouseEntity.setPcode("0"); } @@ -164,13 +164,13 @@ public class InvWarehouseController { FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); filterInvWarehouseRequest.setPid(invWarehouseEntity.getPid()); - InvWarehouseEntity codeEntity = invWarehouseService.selectMaxCode(filterInvWarehouseRequest); + String maxCode = invWarehouseService.selectMaxCode(filterInvWarehouseRequest); InvWarehouseEntity pEntity = invWarehouseService.selectById(invWarehouseEntity.getPid() + ""); - if (codeEntity == null) { + if (StrUtil.isBlank(maxCode)) { int code = Integer.parseInt(pEntity.getCode()) * 1000; invWarehouseEntity.setCode(code + ""); } else { - invWarehouseEntity.setCode(Integer.parseInt(codeEntity.getCode()) + 1 + ""); + invWarehouseEntity.setCode(Integer.parseInt(maxCode) + 1 + ""); } invWarehouseEntity.setAdvanceType(pEntity.getAdvanceType()); invWarehouseEntity.setLevel(pEntity.getLevel()); diff --git a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java index 1914669..75f64d2 100644 --- a/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java +++ b/src/main/java/com/glxp/udi/admin/controller/param/SystemPDFModuleController.java @@ -142,10 +142,7 @@ public class SystemPDFModuleController { systemPDFModuleEntity.setCreate_time(new Date()); systemPDFModuleEntity.setUpdate_time(new Date()); - boolean b = systemPDFModuleService.insert(systemPDFModuleEntity); - if (!b) { - return ResultVOUtils.error(ResultEnum.NOT_NETWORK); - } + systemPDFModuleService.insert(systemPDFModuleEntity); return ResultVOUtils.success(); } diff --git a/src/main/java/com/glxp/udi/admin/dao/auth/AuthRoleDao.java b/src/main/java/com/glxp/udi/admin/dao/auth/AuthRoleDao.java index f1cd149..9667df7 100644 --- a/src/main/java/com/glxp/udi/admin/dao/auth/AuthRoleDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/auth/AuthRoleDao.java @@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.glxp.udi.admin.entity.auth.AuthRole; -import com.glxp.udi.admin.req.auth.AuthRoleQueryRequest; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -13,13 +12,6 @@ import java.util.List; @Mapper public interface AuthRoleDao extends BaseMapper { - /** - * 后台管理业务查询列表 - * - * @return 列表 - */ - Page listAdminPage(Page page, AuthRoleQueryRequest authRoleQueryRequest); - /** * 返回id,name 字段的列表 * diff --git a/src/main/java/com/glxp/udi/admin/dao/auth/CustomerInfoDao.java b/src/main/java/com/glxp/udi/admin/dao/auth/CustomerInfoDao.java index 00df7c7..ea65b7c 100644 --- a/src/main/java/com/glxp/udi/admin/dao/auth/CustomerInfoDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/auth/CustomerInfoDao.java @@ -16,8 +16,6 @@ public interface CustomerInfoDao extends BaseMapper { boolean updateCustomerInfo(CustomerInfoEntity customerInfoEntity); - boolean deleteById(Long customerId); - CustomerDetailEntity selectDetail(Long customerId); /** diff --git a/src/main/java/com/glxp/udi/admin/dao/auth/DeviceKeyDao.java b/src/main/java/com/glxp/udi/admin/dao/auth/DeviceKeyDao.java index f0f225c..a91585d 100644 --- a/src/main/java/com/glxp/udi/admin/dao/auth/DeviceKeyDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/auth/DeviceKeyDao.java @@ -1,7 +1,7 @@ package com.glxp.udi.admin.dao.auth; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.glxp.udi.admin.entity.info.DeviceKeyEntity; import com.glxp.udi.admin.req.info.FilterDeviceKeyRequest; import com.glxp.udi.admin.req.inout.DeleteRequest; @@ -32,5 +32,5 @@ public interface DeviceKeyDao extends BaseMapper { * @param customerId * @return */ - Page findDeviceKeyByCustomerId(Page page, @Param("filterDeviceKeyRequest") FilterDeviceKeyRequest filterDeviceKeyRequest); + IPage findDeviceKeyByCustomerId(IPage page, @Param("imei") String imei, @Param("isCheck") String isCheck, @Param("customerIds") List customerIds); } diff --git a/src/main/java/com/glxp/udi/admin/dao/info/PlatformDao.java b/src/main/java/com/glxp/udi/admin/dao/info/PlatformDao.java index 125e5a3..45f1c6b 100644 --- a/src/main/java/com/glxp/udi/admin/dao/info/PlatformDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/info/PlatformDao.java @@ -14,12 +14,8 @@ import java.util.Map; @Mapper public interface PlatformDao extends BaseMapper { - int save(PlatformEntity platformEntity); - int batchSave(List list); - int update(PlatformEntity platformEntity); - Page list(Page page, Map map); int count(Map map); @@ -34,13 +30,6 @@ public interface PlatformDao extends BaseMapper { */ IPage getLinkPlatformList(IPage page, String customerId, String key); - /** - * 查询未被绑定的平台 - * - * @return - */ - List getUnbindList(@Param("customerId") long customerId); - /** * 根据名称和访问地址查询平台信息 * diff --git a/src/main/java/com/glxp/udi/admin/dao/inout/CodesTempDao.java b/src/main/java/com/glxp/udi/admin/dao/inout/CodesTempDao.java index 46f9ecf..3e2a9b7 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inout/CodesTempDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inout/CodesTempDao.java @@ -27,7 +27,7 @@ public interface CodesTempDao extends BaseMapper { * @param id * @param orderId */ - void delete(@Param("id") String id, @Param("orderId") String orderId); + void deleteByIdAndOrderId(@Param("id") String id, @Param("orderId") String orderId); /** * 更新数量 diff --git a/src/main/java/com/glxp/udi/admin/dao/inout/UdiRelevanceDao.java b/src/main/java/com/glxp/udi/admin/dao/inout/UdiRelevanceDao.java index 8b80e25..1f6a049 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inout/UdiRelevanceDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inout/UdiRelevanceDao.java @@ -37,8 +37,6 @@ public interface UdiRelevanceDao extends BaseMapper { boolean updateUdiRelevance(UdiRelevanceEntity udiRelevanceEntity); - boolean deleteById(@Param("id") String id); - boolean deleteByIds(@Param("ids") List id); boolean deleteByUuid(@Param("uuid") String uuid); diff --git a/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java b/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java index 31ba253..18f2b3f 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseBussinessTypeDao.java @@ -11,22 +11,6 @@ import java.util.List; @Mapper public interface WarehouseBussinessTypeDao extends BaseMapper { - int deleteByPrimaryKey(Integer id); - - int insert(WarehouseBussinessTypeEntity record); - - int insertOrUpdate(WarehouseBussinessTypeEntity record); - - int insertOrUpdateSelective(WarehouseBussinessTypeEntity record); - - int insertSelective(WarehouseBussinessTypeEntity record); - - WarehouseBussinessTypeEntity selectByPrimaryKey(Integer id); - - int updateByPrimaryKeySelective(WarehouseBussinessTypeEntity record); - - int updateByPrimaryKey(WarehouseBussinessTypeEntity record); - int updateBatch(List list); int updateBatchSelective(List list); diff --git a/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseUserDao.java b/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseUserDao.java index 269c7b1..9969431 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseUserDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inout/WarehouseUserDao.java @@ -10,22 +10,11 @@ import java.util.List; @Mapper public interface WarehouseUserDao extends BaseMapper { - int deleteByPrimaryKey(Integer id); - - int insert(WarehouseUserEntity record); - - int insertOrUpdate(WarehouseUserEntity record); int insertOrUpdateSelective(WarehouseUserEntity record); - int insertSelective(WarehouseUserEntity record); - - WarehouseUserEntity selectByPrimaryKey(Integer id); - int updateByPrimaryKeySelective(WarehouseUserEntity record); - int updateByPrimaryKey(WarehouseUserEntity record); - int updateBatch(List list); int updateBatchSelective(List list); diff --git a/src/main/java/com/glxp/udi/admin/dao/inventory/InvWarehouseDao.java b/src/main/java/com/glxp/udi/admin/dao/inventory/InvWarehouseDao.java index 6244554..026ee1b 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inventory/InvWarehouseDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inventory/InvWarehouseDao.java @@ -13,7 +13,7 @@ public interface InvWarehouseDao extends BaseMapper { List filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest); - InvWarehouseEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest); + String selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest); List filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest); diff --git a/src/main/java/com/glxp/udi/admin/dao/inventory/StockPrintTempDao.java b/src/main/java/com/glxp/udi/admin/dao/inventory/StockPrintTempDao.java index bf733f7..d251383 100644 --- a/src/main/java/com/glxp/udi/admin/dao/inventory/StockPrintTempDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/inventory/StockPrintTempDao.java @@ -8,7 +8,13 @@ import org.apache.ibatis.annotations.Mapper; @Mapper public interface StockPrintTempDao extends BaseMapper { - boolean delete(DeleteStPrintTempRequest deleteStPrintTempRequest); + /** + * 根据参数删除 + * + * @param deleteStPrintTempRequest + * @return + */ + boolean deleteByParams(DeleteStPrintTempRequest deleteStPrintTempRequest); boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity); diff --git a/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFModuleDao.java b/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFModuleDao.java index aab38d7..289888d 100644 --- a/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFModuleDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFModuleDao.java @@ -11,8 +11,6 @@ public interface SystemPDFModuleDao extends BaseMapper { Page listPDFModules(Page page); - boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest); - - boolean insertData(SystemPDFModuleEntity systemPDFModuleEntity); + boolean updateByParam(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest); } diff --git a/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateDao.java b/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateDao.java index 378cac7..2219716 100644 --- a/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateDao.java +++ b/src/main/java/com/glxp/udi/admin/dao/param/SystemPDFTemplateDao.java @@ -12,7 +12,7 @@ public interface SystemPDFTemplateDao extends BaseMapper listPDFTemplates(Page page); - boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest); + boolean updateByParams(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest); /** diff --git a/src/main/java/com/glxp/udi/admin/req/info/FilterDeviceKeyRequest.java b/src/main/java/com/glxp/udi/admin/req/info/FilterDeviceKeyRequest.java index bd77ebc..51f82ab 100644 --- a/src/main/java/com/glxp/udi/admin/req/info/FilterDeviceKeyRequest.java +++ b/src/main/java/com/glxp/udi/admin/req/info/FilterDeviceKeyRequest.java @@ -7,8 +7,12 @@ import java.util.List; @Data public class FilterDeviceKeyRequest extends ListPageRequest { + private String imei; + private String isCheck; + private String customerName; + private List customerIds; } diff --git a/src/main/java/com/glxp/udi/admin/service/auth/CustomerInfoService.java b/src/main/java/com/glxp/udi/admin/service/auth/CustomerInfoService.java index bd8ea17..c05563a 100644 --- a/src/main/java/com/glxp/udi/admin/service/auth/CustomerInfoService.java +++ b/src/main/java/com/glxp/udi/admin/service/auth/CustomerInfoService.java @@ -58,8 +58,8 @@ public class CustomerInfoService { return false; } - public boolean deleteById(Long id) { - return customerInfoDao.deleteById(id); + public void deleteById(Long id) { + customerInfoDao.deleteById(id); } public CustomerInfoEntity selectById(Long customerId) { diff --git a/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java b/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java index 668e5ef..1dd7552 100644 --- a/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java +++ b/src/main/java/com/glxp/udi/admin/service/auth/DeviceKeyService.java @@ -2,6 +2,7 @@ package com.glxp.udi.admin.service.auth; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.glxp.udi.admin.dao.auth.CustomerInfoDao; import com.glxp.udi.admin.dao.auth.DeviceKeyDao; @@ -48,7 +49,7 @@ public class DeviceKeyService { deviceKeyDao.deleteDeviceKey(deleteRequest); } - public Page findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) { + public IPage findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) { if (null == filterDeviceKeyRequest) { return new Page<>(); } @@ -60,7 +61,7 @@ public class DeviceKeyService { return new Page<>(); } } - Page page = new Page<>(filterDeviceKeyRequest.getPage(), filterDeviceKeyRequest.getLimit()); - return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest); + IPage page = new Page<>(filterDeviceKeyRequest.getPage(), filterDeviceKeyRequest.getLimit()); + return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest.getImei(), filterDeviceKeyRequest.getIsCheck(),filterDeviceKeyRequest.getCustomerIds()); } } diff --git a/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java b/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java index a18b724..35141c2 100644 --- a/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java +++ b/src/main/java/com/glxp/udi/admin/service/info/PlatformService.java @@ -40,7 +40,7 @@ public class PlatformService { if (StringUtils.isEmpty(platformEntity.getId())) { platformEntity.setId(String.valueOf(IdUtil.getSnowflakeNextId())); } - return platformDao.save(platformEntity); + return platformDao.insert(platformEntity); } public int remove(String id) { @@ -56,7 +56,7 @@ public class PlatformService { return ResultVOUtils.error(500, "已存在相同数据"); } } - platformDao.update(platformEntity); + platformDao.updateById(platformEntity); return ResultVOUtils.success("更新成功"); } diff --git a/src/main/java/com/glxp/udi/admin/service/inout/UdiRelevanceService.java b/src/main/java/com/glxp/udi/admin/service/inout/UdiRelevanceService.java index f87075f..92ec189 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/UdiRelevanceService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/UdiRelevanceService.java @@ -39,10 +39,6 @@ public class UdiRelevanceService { return udiRelevanceDao.selectById(id); } - public boolean deleteById(String id) { - return udiRelevanceDao.deleteById(id); - } - public List selectAllByNameCode(String nameCode) { List udiRelevanceResponses = new ArrayList<>(); UdiRelevanceResponse udiRelevanceResponse = selectByNameCode(nameCode); diff --git a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java index 2b787f7..cf0de10 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseBussinessTypeService.java @@ -67,7 +67,7 @@ public class WarehouseBussinessTypeService { */ public void deleteWarehouseByssuinessType(Integer id) { if (null != id) { - warehouseBussinessTypeDao.deleteByPrimaryKey(id); + warehouseBussinessTypeDao.deleteById(id); } } diff --git a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java index 3b803b5..c775964 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseTempService.java @@ -60,7 +60,7 @@ public class WarehouseTempService { } public void deleteCode(DeleteRequest deleteRequest) { - codesTempDao.delete(deleteRequest.getId(), deleteRequest.getOrderId()); + codesTempDao.deleteByIdAndOrderId(deleteRequest.getId(), deleteRequest.getOrderId()); } public WarehousetempEntity findTempById(String id) { diff --git a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseUserService.java b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseUserService.java index dd3a14b..940f9a4 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/WarehouseUserService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/WarehouseUserService.java @@ -56,7 +56,7 @@ public class WarehouseUserService { */ public void updateDirector(Integer id) { if (null != id) { - WarehouseUserEntity warehouseUserEntity = warehouseUserDao.selectByPrimaryKey(id); + WarehouseUserEntity warehouseUserEntity = warehouseUserDao.selectById(id); warehouseUserDao.updateDirector(warehouseUserEntity.getCode(), 0); warehouseUserDao.updateDirectorById(id, 1); } @@ -69,7 +69,7 @@ public class WarehouseUserService { */ public void deleteWarehouseUser(Integer id) { if (null != id) { - warehouseUserDao.deleteByPrimaryKey(id); + warehouseUserDao.deleteById(id); } } diff --git a/src/main/java/com/glxp/udi/admin/service/inventory/InvWarehouseService.java b/src/main/java/com/glxp/udi/admin/service/inventory/InvWarehouseService.java index 7927c08..da0b5d5 100644 --- a/src/main/java/com/glxp/udi/admin/service/inventory/InvWarehouseService.java +++ b/src/main/java/com/glxp/udi/admin/service/inventory/InvWarehouseService.java @@ -28,8 +28,13 @@ public class InvWarehouseService { @Resource private WarehouseUserDao warehouseUserDao; - public InvWarehouseEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest) { - return invWarehouseDao.selectMaxCode(filterInvWarehouseRequest); + public String selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest) { + String maxCode = invWarehouseDao.selectMaxCode(filterInvWarehouseRequest); + if (StrUtil.isBlank(maxCode)) { + //无仓库数据时,从1000开始 + maxCode = "1000"; + } + return maxCode; } public IPage filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) { @@ -142,12 +147,12 @@ public class InvWarehouseService { FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); filterInvWarehouseRequest.setPid(0); //查询数据库仓库中已经的最大仓库码 - InvWarehouseEntity warehouseEntity = invWarehouseDao.selectMaxCode(filterInvWarehouseRequest); + String maxCode = invWarehouseDao.selectMaxCode(filterInvWarehouseRequest); Integer code; - if (warehouseEntity == null) { + if (StrUtil.isNotBlank(maxCode)) { code = 1000; //无仓库时,编码从1000开始 } else { - code = Integer.parseInt(warehouseEntity.getCode()) + 1; + code = Integer.parseInt(maxCode) + 1; } warehouse.setCustomerId(String.valueOf(customerId)); warehouse.setAdvanceType(false); diff --git a/src/main/java/com/glxp/udi/admin/service/inventory/StockPrintTempService.java b/src/main/java/com/glxp/udi/admin/service/inventory/StockPrintTempService.java index 88b657b..eedd6d7 100644 --- a/src/main/java/com/glxp/udi/admin/service/inventory/StockPrintTempService.java +++ b/src/main/java/com/glxp/udi/admin/service/inventory/StockPrintTempService.java @@ -34,8 +34,8 @@ public class StockPrintTempService { return stockPrintTempDao.selectPage(page, wrapper); } - public boolean deleteById(DeleteStPrintTempRequest deleteStPrintTempRequest) { - return stockPrintTempDao.delete(deleteStPrintTempRequest); + public void deleteById(DeleteStPrintTempRequest deleteStPrintTempRequest) { + stockPrintTempDao.deleteByParams(deleteStPrintTempRequest); } public boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity) { diff --git a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFModuleService.java b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFModuleService.java index 6de6250..b6689c3 100644 --- a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFModuleService.java +++ b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFModuleService.java @@ -42,11 +42,11 @@ public class SystemPDFModuleService { } public boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest) { - return systemPDFModuleDao.updateById(systemPDFModuleSaveRequest); + return systemPDFModuleDao.updateByParam(systemPDFModuleSaveRequest); } - public boolean insert(SystemPDFModuleEntity systemPDFModuleEntity) { - return systemPDFModuleDao.insertData(systemPDFModuleEntity); + public void insert(SystemPDFModuleEntity systemPDFModuleEntity) { + systemPDFModuleDao.insert(systemPDFModuleEntity); } public void deleteById(Integer id) { diff --git a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java index e68f5b9..5950058 100644 --- a/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java +++ b/src/main/java/com/glxp/udi/admin/service/param/SystemPDFTemplateService.java @@ -40,7 +40,7 @@ public class SystemPDFTemplateService { } public boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) { - return systemPDFTemplateDao.updateById(systemPDFTemplateSaveRequest); + return systemPDFTemplateDao.updateByParams(systemPDFTemplateSaveRequest); } public boolean insert(SystemPDFTemplateEntity systemPDFTemplateEntity) { diff --git a/src/main/resources/mybatis/mapper/auth/AuthRoleDao.xml b/src/main/resources/mybatis/mapper/auth/AuthRoleDao.xml index af2c784..befdb00 100644 --- a/src/main/resources/mybatis/mapper/auth/AuthRoleDao.xml +++ b/src/main/resources/mybatis/mapper/auth/AuthRoleDao.xml @@ -2,19 +2,6 @@ - select customerId from customer_info diff --git a/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml b/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml index 7254a8f..ef06710 100644 --- a/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml +++ b/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml @@ -27,7 +27,6 @@ - UPDATE device_check @@ -140,16 +139,15 @@ left join customer_info customer on device.customerId = customer.customerId - - AND device.imei = #{filterDeviceKeyRequest.imei} + + AND device.imei = #{imei} - - AND device.isCheck = #{filterDeviceKeyRequest.isCheck} + + AND device.isCheck = #{isCheck} - + AND device.customerId in - + #{item} diff --git a/src/main/resources/mybatis/mapper/info/PlatformDao.xml b/src/main/resources/mybatis/mapper/info/PlatformDao.xml index 5ebec0e..b2ad9e8 100644 --- a/src/main/resources/mybatis/mapper/info/PlatformDao.xml +++ b/src/main/resources/mybatis/mapper/info/PlatformDao.xml @@ -2,11 +2,6 @@ - - insert into auth_platform - (id, name, host) - values (#{id}, #{name,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR}) - replace into auth_platform @@ -18,18 +13,6 @@ - - update auth_platform - - - name=#{name}, - - - host=#{host}, - - - where id = #{id} - - - select - - from inv_warehouse_bussiness_type - where id = #{id,jdbcType=INTEGER} - - - delete from inv_warehouse_bussiness_type - where id = #{id,jdbcType=INTEGER} - - - insert into inv_warehouse_bussiness_type (code, `action`, `name` - ) - values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR} - ) - - - insert into inv_warehouse_bussiness_type - - - code, - - - `action`, - - - `name`, - - - - - #{code,jdbcType=VARCHAR}, - - - #{action,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - - - update inv_warehouse_bussiness_type - - - code = #{code,jdbcType=VARCHAR}, - - - `action` = #{action,jdbcType=VARCHAR}, - - - `name` = #{name,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update inv_warehouse_bussiness_type - set code = #{code,jdbcType=VARCHAR}, - `action` = #{action,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - + update inv_warehouse_bussiness_type @@ -139,84 +74,6 @@ ) - - insert into inv_warehouse_bussiness_type - - - id, - - code, - `action`, - `name`, - - values - - - #{id,jdbcType=INTEGER}, - - #{code,jdbcType=VARCHAR}, - #{action,jdbcType=VARCHAR}, - #{name,jdbcType=VARCHAR}, - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - code = #{code,jdbcType=VARCHAR}, - `action` = #{action,jdbcType=VARCHAR}, - `name` = #{name,jdbcType=VARCHAR}, - - - - insert into inv_warehouse_bussiness_type - - - id, - - - code, - - - `action`, - - - `name`, - - - values - - - #{id,jdbcType=INTEGER}, - - - #{code,jdbcType=VARCHAR}, - - - #{action,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - - code = #{code,jdbcType=VARCHAR}, - - - `action` = #{action,jdbcType=VARCHAR}, - - - `name` = #{name,jdbcType=VARCHAR}, - - - - select - - from inv_warehouse_user - where id = #{id,jdbcType=INTEGER} - - - delete - from inv_warehouse_user - where id = #{id,jdbcType=INTEGER} - - - insert into inv_warehouse_user (code, userId, userName, isDirector) - values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{isDirector}) - - - insert into inv_warehouse_user - - - code, - - - userId, - - - userName, - - isDirector - - - - #{code,jdbcType=VARCHAR}, - - - #{userid,jdbcType=BIGINT}, - - - #{username,jdbcType=VARCHAR}, - - #{isDirector} - - + update inv_warehouse_user @@ -75,13 +33,7 @@ isDirector = #{isDirector} where id = #{id,jdbcType=INTEGER} - - update inv_warehouse_user - set code = #{code,jdbcType=VARCHAR}, - userId = #{userid,jdbcType=BIGINT}, - userName = #{username,jdbcType=VARCHAR} isDirector = #{isDirector} - where id = #{id,jdbcType=INTEGER} - + update inv_warehouse_user @@ -106,6 +58,7 @@ #{item.id,jdbcType=INTEGER} + update inv_warehouse_user @@ -136,6 +89,7 @@ #{item.id,jdbcType=INTEGER} + insert into inv_warehouse_user (code, userId, userName, isDirector) @@ -145,38 +99,7 @@ #{item.isDirector}) - - insert into inv_warehouse_user - - - id, - - code, - userId, - userName, - isDirector, - - values - - - #{id,jdbcType=INTEGER}, - - #{code,jdbcType=VARCHAR}, - #{userid,jdbcType=BIGINT}, - #{username,jdbcType=VARCHAR}, - #{isDirector} - - on duplicate key update - - - id = #{id,jdbcType=INTEGER}, - - code = #{code,jdbcType=VARCHAR}, - userId = #{userid,jdbcType=BIGINT}, - userName = #{username,jdbcType=VARCHAR}, - - + insert into inv_warehouse_user @@ -238,6 +161,7 @@ from inv_warehouse_user where userId = #{userId} + delete from inv_warehouse_user diff --git a/src/main/resources/mybatis/mapper/inventory/InvWarehouseDao.xml b/src/main/resources/mybatis/mapper/inventory/InvWarehouseDao.xml index 319d227..f67e4f3 100644 --- a/src/main/resources/mybatis/mapper/inventory/InvWarehouseDao.xml +++ b/src/main/resources/mybatis/mapper/inventory/InvWarehouseDao.xml @@ -42,7 +42,7 @@ SELECT id, name diff --git a/src/main/resources/mybatis/mapper/param/SystemPDFTemplateDao.xml b/src/main/resources/mybatis/mapper/param/SystemPDFTemplateDao.xml index 2b319df..8848354 100644 --- a/src/main/resources/mybatis/mapper/param/SystemPDFTemplateDao.xml +++ b/src/main/resources/mybatis/mapper/param/SystemPDFTemplateDao.xml @@ -2,7 +2,7 @@ - + UPDATE system_pdf_template