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 277e482..d1f97a7 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 @@ -51,7 +51,8 @@ public class DeviceKeyController { if (bindingResult.hasErrors()) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage()); } - deviceKeyEntity.setDate(DateUtil.getDate()); + deviceKeyEntity.setAuditTime(cn.hutool.core.date.DateUtil.now()); + deviceKeyEntity.setUpdateTime(cn.hutool.core.date.DateUtil.now()); deviceKeyService.updateDeviceKey(deviceKeyEntity); return ResultVOUtils.success("审核成功"); } @@ -94,6 +95,7 @@ public class DeviceKeyController { deviceKeyEntity.setCompanyName(company.getCompanyName()); } deviceKeyEntity.setDate(DateUtil.getDateTime()); + deviceKeyEntity.setUpdateTime(cn.hutool.core.date.DateUtil.now()); deviceKeyEntity.setIsCheck(0); deviceKeyService.insertDeviceKey(deviceKeyEntity); return ResultVOUtils.success("1"); diff --git a/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java b/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java index d60fbf8..8aafcb6 100644 --- a/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java +++ b/src/main/java/com/glxp/udi/admin/controller/param/SystemParamConfigController.java @@ -1,6 +1,7 @@ package com.glxp.udi.admin.controller.param; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.glxp.udi.admin.annotation.AuthRuleAnnotation; import com.glxp.udi.admin.common.res.BaseResponse; @@ -89,7 +90,7 @@ public class SystemParamConfigController { @AuthRuleAnnotation("system/param/config/update") @PostMapping("/system/param/config/update") public BaseResponse update(@RequestBody SystemParamConfigSaveRequest systemParamConfigSaveRequest) { - if (null == systemParamConfigSaveRequest) { + if (null == systemParamConfigSaveRequest || StrUtil.isBlank(systemParamConfigSaveRequest.getParamValue())) { return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL); } systemParamConfigSaveRequest.setCustomerId(String.valueOf(customerService.getCustomerId())); 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 d874bad..9281adb 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 @@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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; import com.glxp.udi.admin.res.info.DeviceKeyResponse; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -18,18 +17,14 @@ public interface DeviceKeyDao extends BaseMapper { List findDeviceKey(FilterDeviceKeyRequest filterDeviceKeyRequest); - void insertDeviceKey(DeviceKeyEntity deviceKeyEntity); - - void updateDeviceKey(DeviceKeyEntity deviceKeyEntity); - - void updateDeviceKeyByImei(DeviceKeyEntity deviceKeyEntity); - - void deleteDeviceKey(DeleteRequest deleteRequest); /** * 根据客户ID查询 * - * @param customerId + * @param page + * @param imei + * @param isCheck + * @param customerIds * @return */ IPage findDeviceKeyByCustomerId(@Param("page") IPage page, @Param("imei") String imei, @Param("isCheck") String isCheck, @Param("customerIds") List customerIds); diff --git a/src/main/java/com/glxp/udi/admin/entity/info/DeviceKeyEntity.java b/src/main/java/com/glxp/udi/admin/entity/info/DeviceKeyEntity.java index 3901308..a10a1c9 100644 --- a/src/main/java/com/glxp/udi/admin/entity/info/DeviceKeyEntity.java +++ b/src/main/java/com/glxp/udi/admin/entity/info/DeviceKeyEntity.java @@ -25,15 +25,25 @@ public class DeviceKeyEntity { private String creditNum; - private int checkCode; - private String rgType; private String remark; private String customerId; - //申请人 + /** + * 申请人 + */ private String applicant; + /** + * 审核时间 + */ + private String auditTime; + + /** + * 更新时间 + */ + private String updateTime; + } diff --git a/src/main/java/com/glxp/udi/admin/entity/inout/WarehouseUserEntity.java b/src/main/java/com/glxp/udi/admin/entity/inout/WarehouseUserEntity.java index 45e797e..72aea1e 100644 --- a/src/main/java/com/glxp/udi/admin/entity/inout/WarehouseUserEntity.java +++ b/src/main/java/com/glxp/udi/admin/entity/inout/WarehouseUserEntity.java @@ -35,6 +35,4 @@ public class WarehouseUserEntity { */ private boolean isDirector; - private String employeeName; - } \ No newline at end of file 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 1eeb799..877ffc6 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 @@ -38,15 +38,15 @@ public class DeviceKeyService { } public void insertDeviceKey(DeviceKeyEntity deviceKeyEntity) { - deviceKeyDao.insertDeviceKey(deviceKeyEntity); + deviceKeyDao.insert(deviceKeyEntity); } public void updateDeviceKey(DeviceKeyEntity deviceKeyEntity) { - deviceKeyDao.updateDeviceKey(deviceKeyEntity); + deviceKeyDao.updateById(deviceKeyEntity); } public void deleteDeviceKey(DeleteRequest deleteRequest) { - deviceKeyDao.deleteDeviceKey(deleteRequest); + deviceKeyDao.deleteById(deleteRequest.getId()); } public IPage findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) { diff --git a/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java b/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java index deb42f4..1c90010 100644 --- a/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java +++ b/src/main/java/com/glxp/udi/admin/service/inout/UdiInfoService.java @@ -83,7 +83,7 @@ public class UdiInfoService { .eq(StrUtil.isNotBlank(filterUdiInfoRequest.getCustomerId()), "customerId", filterUdiInfoRequest.getCustomerId()) .eq(null != filterUdiInfoRequest.getDiType(), "diType", filterUdiInfoRequest.getDiType()) .like(StrUtil.isNotBlank(filterUdiInfoRequest.getThirdId()),"thirdId", filterUdiInfoRequest.getThirdId()) - .groupBy("uuid").orderByDesc("lastUpdateTime"); + .orderByDesc("lastUpdateTime"); return wrapper; } diff --git a/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml b/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml index ef06710..2de7cd2 100644 --- a/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml +++ b/src/main/resources/mybatis/mapper/auth/DeviceKeyDao.xml @@ -27,112 +27,6 @@ - - UPDATE device_check - - - isCheck=#{isCheck}, - - - companyName=#{companyName}, - - - phone=#{phone}, - - - contact=#{contact}, - - - imeiKey=#{imeiKey}, - - - date=#{date}, - - - creditNum=#{creditNum}, - - - rgType=#{rgType}, - - - remark=#{remark}, - - - customerId=#{customerId}, - - - applicant=#{applicant}, - - - WHERE id = #{id} - - - - UPDATE device_check - - - isCheck=#{isCheck}, - - - companyName=#{companyName}, - - - phone=#{phone}, - - - contact=#{contact}, - - - imeiKey=#{imeiKey}, - - - date=#{date}, - - - imei=#{imei}, - - - creditNum=#{creditNum}, - - - rgType=#{rgType}, - - - remark=#{remark}, - - - customerId=#{customerId} - - - applicant=#{applicant} - - - WHERE imei=#{imei} - - - - replace INTO device_check(imei, - isCheck, - companyName, - phone, - contact, - date, - imeiKey, creditNum, rgType, remark, customerId, applicant) - values (#{imei}, - #{isCheck}, - #{companyName}, - #{phone}, - #{contact}, - #{date}, - #{imeiKey}, #{creditNum}, #{rgType}, #{remark}, #{customerId}, - #{applicant}) - - - DELETE - FROM device_check - WHERE id = #{id} - -