1.删除部分无用的查询

2.修复仓库无数据时,查询最大仓库编码错误问题
master
x_z 3 years ago
parent 5f3948c732
commit 4fcebd49d8

@ -1,7 +1,7 @@
package com.glxp.udi.admin.controller.info; package com.glxp.udi.admin.controller.info;
import cn.hutool.core.util.StrUtil; 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.common.res.BaseResponse;
import com.glxp.udi.admin.entity.auth.AuthAdmin; import com.glxp.udi.admin.entity.auth.AuthAdmin;
import com.glxp.udi.admin.entity.info.CompanyEntity; import com.glxp.udi.admin.entity.info.CompanyEntity;
@ -39,7 +39,7 @@ public class DeviceKeyController {
@GetMapping("sale/device/registerList") @GetMapping("sale/device/registerList")
public BaseResponse registerList(FilterDeviceKeyRequest filterDeviceKeyRequest) { public BaseResponse registerList(FilterDeviceKeyRequest filterDeviceKeyRequest) {
Page<DeviceKeyResponse> page = deviceKeyService.findDeviceKeyResponse(filterDeviceKeyRequest); IPage<DeviceKeyResponse> page = deviceKeyService.findDeviceKeyResponse(filterDeviceKeyRequest);
PageSimpleResponse<DeviceKeyResponse> pageSimpleResponse = new PageSimpleResponse<>(); PageSimpleResponse<DeviceKeyResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(page.getTotal()); pageSimpleResponse.setTotal(page.getTotal());
pageSimpleResponse.setList(page.getRecords()); pageSimpleResponse.setList(page.getRecords());

@ -155,8 +155,8 @@ public class InvWarehouseController {
invWarehouseEntity.setPid(0); // 默认设置 invWarehouseEntity.setPid(0); // 默认设置
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setPid(invWarehouseEntity.getPid()); filterInvWarehouseRequest.setPid(invWarehouseEntity.getPid());
InvWarehouseEntity codeEntity = invWarehouseService.selectMaxCode(filterInvWarehouseRequest); String maxCode = invWarehouseService.selectMaxCode(filterInvWarehouseRequest);
invWarehouseEntity.setCode(Integer.parseInt(codeEntity.getCode()) + 1 + ""); invWarehouseEntity.setCode(Integer.parseInt(maxCode) + 1 + "");
if (null == invWarehouseEntity.getLevel() || invWarehouseEntity.getLevel() == 1) { if (null == invWarehouseEntity.getLevel() || invWarehouseEntity.getLevel() == 1) {
invWarehouseEntity.setPcode("0"); invWarehouseEntity.setPcode("0");
} }
@ -164,13 +164,13 @@ public class InvWarehouseController {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setPid(invWarehouseEntity.getPid()); filterInvWarehouseRequest.setPid(invWarehouseEntity.getPid());
InvWarehouseEntity codeEntity = invWarehouseService.selectMaxCode(filterInvWarehouseRequest); String maxCode = invWarehouseService.selectMaxCode(filterInvWarehouseRequest);
InvWarehouseEntity pEntity = invWarehouseService.selectById(invWarehouseEntity.getPid() + ""); InvWarehouseEntity pEntity = invWarehouseService.selectById(invWarehouseEntity.getPid() + "");
if (codeEntity == null) { if (StrUtil.isBlank(maxCode)) {
int code = Integer.parseInt(pEntity.getCode()) * 1000; int code = Integer.parseInt(pEntity.getCode()) * 1000;
invWarehouseEntity.setCode(code + ""); invWarehouseEntity.setCode(code + "");
} else { } else {
invWarehouseEntity.setCode(Integer.parseInt(codeEntity.getCode()) + 1 + ""); invWarehouseEntity.setCode(Integer.parseInt(maxCode) + 1 + "");
} }
invWarehouseEntity.setAdvanceType(pEntity.getAdvanceType()); invWarehouseEntity.setAdvanceType(pEntity.getAdvanceType());
invWarehouseEntity.setLevel(pEntity.getLevel()); invWarehouseEntity.setLevel(pEntity.getLevel());

@ -142,10 +142,7 @@ public class SystemPDFModuleController {
systemPDFModuleEntity.setCreate_time(new Date()); systemPDFModuleEntity.setCreate_time(new Date());
systemPDFModuleEntity.setUpdate_time(new Date()); systemPDFModuleEntity.setUpdate_time(new Date());
boolean b = systemPDFModuleService.insert(systemPDFModuleEntity); systemPDFModuleService.insert(systemPDFModuleEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
}
return ResultVOUtils.success(); return ResultVOUtils.success();
} }

@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.entity.auth.AuthRole; 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.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -13,13 +12,6 @@ import java.util.List;
@Mapper @Mapper
public interface AuthRoleDao extends BaseMapper<AuthRole> { public interface AuthRoleDao extends BaseMapper<AuthRole> {
/**
*
*
* @return
*/
Page<AuthRole> listAdminPage(Page<AuthRole> page, AuthRoleQueryRequest authRoleQueryRequest);
/** /**
* id,name * id,name
* *

@ -16,8 +16,6 @@ public interface CustomerInfoDao extends BaseMapper<CustomerInfoEntity> {
boolean updateCustomerInfo(CustomerInfoEntity customerInfoEntity); boolean updateCustomerInfo(CustomerInfoEntity customerInfoEntity);
boolean deleteById(Long customerId);
CustomerDetailEntity selectDetail(Long customerId); CustomerDetailEntity selectDetail(Long customerId);
/** /**

@ -1,7 +1,7 @@
package com.glxp.udi.admin.dao.auth; package com.glxp.udi.admin.dao.auth;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; 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.entity.info.DeviceKeyEntity;
import com.glxp.udi.admin.req.info.FilterDeviceKeyRequest; import com.glxp.udi.admin.req.info.FilterDeviceKeyRequest;
import com.glxp.udi.admin.req.inout.DeleteRequest; import com.glxp.udi.admin.req.inout.DeleteRequest;
@ -32,5 +32,5 @@ public interface DeviceKeyDao extends BaseMapper<DeviceKeyEntity> {
* @param customerId * @param customerId
* @return * @return
*/ */
Page<DeviceKeyResponse> findDeviceKeyByCustomerId(Page<DeviceKeyResponse> page, @Param("filterDeviceKeyRequest") FilterDeviceKeyRequest filterDeviceKeyRequest); IPage<DeviceKeyResponse> findDeviceKeyByCustomerId(IPage<DeviceKeyResponse> page, @Param("imei") String imei, @Param("isCheck") String isCheck, @Param("customerIds") List<String> customerIds);
} }

@ -14,12 +14,8 @@ import java.util.Map;
@Mapper @Mapper
public interface PlatformDao extends BaseMapper<PlatformEntity> { public interface PlatformDao extends BaseMapper<PlatformEntity> {
int save(PlatformEntity platformEntity);
int batchSave(List<PlatformEntity> list); int batchSave(List<PlatformEntity> list);
int update(PlatformEntity platformEntity);
Page<PlatformEntity> list(Page<PlatformEntity> page, Map<String, Object> map); Page<PlatformEntity> list(Page<PlatformEntity> page, Map<String, Object> map);
int count(Map<String, Object> map); int count(Map<String, Object> map);
@ -34,13 +30,6 @@ public interface PlatformDao extends BaseMapper<PlatformEntity> {
*/ */
IPage<PlatformLinkResponse> getLinkPlatformList(IPage<PlatformLinkResponse> page, String customerId, String key); IPage<PlatformLinkResponse> getLinkPlatformList(IPage<PlatformLinkResponse> page, String customerId, String key);
/**
*
*
* @return
*/
List<PlatformEntity> getUnbindList(@Param("customerId") long customerId);
/** /**
* 访 * 访
* *

@ -27,7 +27,7 @@ public interface CodesTempDao extends BaseMapper<WarehousetempEntity> {
* @param id * @param id
* @param orderId * @param orderId
*/ */
void delete(@Param("id") String id, @Param("orderId") String orderId); void deleteByIdAndOrderId(@Param("id") String id, @Param("orderId") String orderId);
/** /**
* *

@ -37,8 +37,6 @@ public interface UdiRelevanceDao extends BaseMapper<UdiRelevanceEntity> {
boolean updateUdiRelevance(UdiRelevanceEntity udiRelevanceEntity); boolean updateUdiRelevance(UdiRelevanceEntity udiRelevanceEntity);
boolean deleteById(@Param("id") String id);
boolean deleteByIds(@Param("ids") List<String> id); boolean deleteByIds(@Param("ids") List<String> id);
boolean deleteByUuid(@Param("uuid") String uuid); boolean deleteByUuid(@Param("uuid") String uuid);

@ -11,22 +11,6 @@ import java.util.List;
@Mapper @Mapper
public interface WarehouseBussinessTypeDao extends BaseMapper<WarehouseBussinessTypeEntity> { public interface WarehouseBussinessTypeDao extends BaseMapper<WarehouseBussinessTypeEntity> {
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<WarehouseBussinessTypeEntity> list); int updateBatch(List<WarehouseBussinessTypeEntity> list);
int updateBatchSelective(List<WarehouseBussinessTypeEntity> list); int updateBatchSelective(List<WarehouseBussinessTypeEntity> list);

@ -10,22 +10,11 @@ import java.util.List;
@Mapper @Mapper
public interface WarehouseUserDao extends BaseMapper<WarehouseUserEntity> { public interface WarehouseUserDao extends BaseMapper<WarehouseUserEntity> {
int deleteByPrimaryKey(Integer id);
int insert(WarehouseUserEntity record);
int insertOrUpdate(WarehouseUserEntity record);
int insertOrUpdateSelective(WarehouseUserEntity record); int insertOrUpdateSelective(WarehouseUserEntity record);
int insertSelective(WarehouseUserEntity record);
WarehouseUserEntity selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(WarehouseUserEntity record); int updateByPrimaryKeySelective(WarehouseUserEntity record);
int updateByPrimaryKey(WarehouseUserEntity record);
int updateBatch(List<WarehouseUserEntity> list); int updateBatch(List<WarehouseUserEntity> list);
int updateBatchSelective(List<WarehouseUserEntity> list); int updateBatchSelective(List<WarehouseUserEntity> list);

@ -13,7 +13,7 @@ public interface InvWarehouseDao extends BaseMapper<InvWarehouseEntity> {
List<InvWarehouseEntity> filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest); List<InvWarehouseEntity> filterAllByUser(FilterInvWarehouseRequest filterInvWarehouseRequest);
InvWarehouseEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest); String selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest);
List<InvWarehouseEntity> filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest); List<InvWarehouseEntity> filterGroupInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest);

@ -8,7 +8,13 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface StockPrintTempDao extends BaseMapper<StockPrintTempEntity> { public interface StockPrintTempDao extends BaseMapper<StockPrintTempEntity> {
boolean delete(DeleteStPrintTempRequest deleteStPrintTempRequest); /**
*
*
* @param deleteStPrintTempRequest
* @return
*/
boolean deleteByParams(DeleteStPrintTempRequest deleteStPrintTempRequest);
boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity); boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity);

@ -11,8 +11,6 @@ public interface SystemPDFModuleDao extends BaseMapper<SystemPDFModuleEntity> {
Page<SystemPDFModuleEntity> listPDFModules(Page<SystemPDFModuleEntity> page); Page<SystemPDFModuleEntity> listPDFModules(Page<SystemPDFModuleEntity> page);
boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest); boolean updateByParam(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest);
boolean insertData(SystemPDFModuleEntity systemPDFModuleEntity);
} }

@ -12,7 +12,7 @@ public interface SystemPDFTemplateDao extends BaseMapper<SystemPDFTemplateEntity
Page<SystemPDFTemplateEntity> listPDFTemplates(Page<SystemPDFTemplateEntity> page); Page<SystemPDFTemplateEntity> listPDFTemplates(Page<SystemPDFTemplateEntity> page);
boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest); boolean updateByParams(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest);
/** /**

@ -7,8 +7,12 @@ import java.util.List;
@Data @Data
public class FilterDeviceKeyRequest extends ListPageRequest { public class FilterDeviceKeyRequest extends ListPageRequest {
private String imei; private String imei;
private String isCheck; private String isCheck;
private String customerName; private String customerName;
private List<String> customerIds; private List<String> customerIds;
} }

@ -58,8 +58,8 @@ public class CustomerInfoService {
return false; return false;
} }
public boolean deleteById(Long id) { public void deleteById(Long id) {
return customerInfoDao.deleteById(id); customerInfoDao.deleteById(id);
} }
public CustomerInfoEntity selectById(Long customerId) { public CustomerInfoEntity selectById(Long customerId) {

@ -2,6 +2,7 @@ package com.glxp.udi.admin.service.auth;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.glxp.udi.admin.dao.auth.CustomerInfoDao; import com.glxp.udi.admin.dao.auth.CustomerInfoDao;
import com.glxp.udi.admin.dao.auth.DeviceKeyDao; import com.glxp.udi.admin.dao.auth.DeviceKeyDao;
@ -48,7 +49,7 @@ public class DeviceKeyService {
deviceKeyDao.deleteDeviceKey(deleteRequest); deviceKeyDao.deleteDeviceKey(deleteRequest);
} }
public Page<DeviceKeyResponse> findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) { public IPage<DeviceKeyResponse> findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) {
if (null == filterDeviceKeyRequest) { if (null == filterDeviceKeyRequest) {
return new Page<>(); return new Page<>();
} }
@ -60,7 +61,7 @@ public class DeviceKeyService {
return new Page<>(); return new Page<>();
} }
} }
Page<DeviceKeyResponse> page = new Page<>(filterDeviceKeyRequest.getPage(), filterDeviceKeyRequest.getLimit()); IPage<DeviceKeyResponse> page = new Page<>(filterDeviceKeyRequest.getPage(), filterDeviceKeyRequest.getLimit());
return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest); return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest.getImei(), filterDeviceKeyRequest.getIsCheck(),filterDeviceKeyRequest.getCustomerIds());
} }
} }

@ -40,7 +40,7 @@ public class PlatformService {
if (StringUtils.isEmpty(platformEntity.getId())) { if (StringUtils.isEmpty(platformEntity.getId())) {
platformEntity.setId(String.valueOf(IdUtil.getSnowflakeNextId())); platformEntity.setId(String.valueOf(IdUtil.getSnowflakeNextId()));
} }
return platformDao.save(platformEntity); return platformDao.insert(platformEntity);
} }
public int remove(String id) { public int remove(String id) {
@ -56,7 +56,7 @@ public class PlatformService {
return ResultVOUtils.error(500, "已存在相同数据"); return ResultVOUtils.error(500, "已存在相同数据");
} }
} }
platformDao.update(platformEntity); platformDao.updateById(platformEntity);
return ResultVOUtils.success("更新成功"); return ResultVOUtils.success("更新成功");
} }

@ -39,10 +39,6 @@ public class UdiRelevanceService {
return udiRelevanceDao.selectById(id); return udiRelevanceDao.selectById(id);
} }
public boolean deleteById(String id) {
return udiRelevanceDao.deleteById(id);
}
public List<UdiRelevanceResponse> selectAllByNameCode(String nameCode) { public List<UdiRelevanceResponse> selectAllByNameCode(String nameCode) {
List<UdiRelevanceResponse> udiRelevanceResponses = new ArrayList<>(); List<UdiRelevanceResponse> udiRelevanceResponses = new ArrayList<>();
UdiRelevanceResponse udiRelevanceResponse = selectByNameCode(nameCode); UdiRelevanceResponse udiRelevanceResponse = selectByNameCode(nameCode);

@ -67,7 +67,7 @@ public class WarehouseBussinessTypeService {
*/ */
public void deleteWarehouseByssuinessType(Integer id) { public void deleteWarehouseByssuinessType(Integer id) {
if (null != id) { if (null != id) {
warehouseBussinessTypeDao.deleteByPrimaryKey(id); warehouseBussinessTypeDao.deleteById(id);
} }
} }

@ -60,7 +60,7 @@ public class WarehouseTempService {
} }
public void deleteCode(DeleteRequest deleteRequest) { public void deleteCode(DeleteRequest deleteRequest) {
codesTempDao.delete(deleteRequest.getId(), deleteRequest.getOrderId()); codesTempDao.deleteByIdAndOrderId(deleteRequest.getId(), deleteRequest.getOrderId());
} }
public WarehousetempEntity findTempById(String id) { public WarehousetempEntity findTempById(String id) {

@ -56,7 +56,7 @@ public class WarehouseUserService {
*/ */
public void updateDirector(Integer id) { public void updateDirector(Integer id) {
if (null != id) { if (null != id) {
WarehouseUserEntity warehouseUserEntity = warehouseUserDao.selectByPrimaryKey(id); WarehouseUserEntity warehouseUserEntity = warehouseUserDao.selectById(id);
warehouseUserDao.updateDirector(warehouseUserEntity.getCode(), 0); warehouseUserDao.updateDirector(warehouseUserEntity.getCode(), 0);
warehouseUserDao.updateDirectorById(id, 1); warehouseUserDao.updateDirectorById(id, 1);
} }
@ -69,7 +69,7 @@ public class WarehouseUserService {
*/ */
public void deleteWarehouseUser(Integer id) { public void deleteWarehouseUser(Integer id) {
if (null != id) { if (null != id) {
warehouseUserDao.deleteByPrimaryKey(id); warehouseUserDao.deleteById(id);
} }
} }

@ -28,8 +28,13 @@ public class InvWarehouseService {
@Resource @Resource
private WarehouseUserDao warehouseUserDao; private WarehouseUserDao warehouseUserDao;
public InvWarehouseEntity selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest) { public String selectMaxCode(FilterInvWarehouseRequest filterInvWarehouseRequest) {
return invWarehouseDao.selectMaxCode(filterInvWarehouseRequest); String maxCode = invWarehouseDao.selectMaxCode(filterInvWarehouseRequest);
if (StrUtil.isBlank(maxCode)) {
//无仓库数据时从1000开始
maxCode = "1000";
}
return maxCode;
} }
public IPage<InvWarehouseEntity> filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) { public IPage<InvWarehouseEntity> filterInvWarehouse(FilterInvWarehouseRequest filterInvWarehouseRequest) {
@ -142,12 +147,12 @@ public class InvWarehouseService {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setPid(0); filterInvWarehouseRequest.setPid(0);
//查询数据库仓库中已经的最大仓库码 //查询数据库仓库中已经的最大仓库码
InvWarehouseEntity warehouseEntity = invWarehouseDao.selectMaxCode(filterInvWarehouseRequest); String maxCode = invWarehouseDao.selectMaxCode(filterInvWarehouseRequest);
Integer code; Integer code;
if (warehouseEntity == null) { if (StrUtil.isNotBlank(maxCode)) {
code = 1000; //无仓库时编码从1000开始 code = 1000; //无仓库时编码从1000开始
} else { } else {
code = Integer.parseInt(warehouseEntity.getCode()) + 1; code = Integer.parseInt(maxCode) + 1;
} }
warehouse.setCustomerId(String.valueOf(customerId)); warehouse.setCustomerId(String.valueOf(customerId));
warehouse.setAdvanceType(false); warehouse.setAdvanceType(false);

@ -34,8 +34,8 @@ public class StockPrintTempService {
return stockPrintTempDao.selectPage(page, wrapper); return stockPrintTempDao.selectPage(page, wrapper);
} }
public boolean deleteById(DeleteStPrintTempRequest deleteStPrintTempRequest) { public void deleteById(DeleteStPrintTempRequest deleteStPrintTempRequest) {
return stockPrintTempDao.delete(deleteStPrintTempRequest); stockPrintTempDao.deleteByParams(deleteStPrintTempRequest);
} }
public boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity) { public boolean insertStockPrintTempEntity(StockPrintTempEntity stockPrintEntity) {

@ -42,11 +42,11 @@ public class SystemPDFModuleService {
} }
public boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest) { public boolean updateById(SystemPDFModuleSaveRequest systemPDFModuleSaveRequest) {
return systemPDFModuleDao.updateById(systemPDFModuleSaveRequest); return systemPDFModuleDao.updateByParam(systemPDFModuleSaveRequest);
} }
public boolean insert(SystemPDFModuleEntity systemPDFModuleEntity) { public void insert(SystemPDFModuleEntity systemPDFModuleEntity) {
return systemPDFModuleDao.insertData(systemPDFModuleEntity); systemPDFModuleDao.insert(systemPDFModuleEntity);
} }
public void deleteById(Integer id) { public void deleteById(Integer id) {

@ -40,7 +40,7 @@ public class SystemPDFTemplateService {
} }
public boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) { public boolean updateById(SystemPDFTemplateSaveRequest systemPDFTemplateSaveRequest) {
return systemPDFTemplateDao.updateById(systemPDFTemplateSaveRequest); return systemPDFTemplateDao.updateByParams(systemPDFTemplateSaveRequest);
} }
public boolean insert(SystemPDFTemplateEntity systemPDFTemplateEntity) { public boolean insert(SystemPDFTemplateEntity systemPDFTemplateEntity) {

@ -2,19 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.auth.AuthRoleDao"> <mapper namespace="com.glxp.udi.admin.dao.auth.AuthRoleDao">
<select id="listAdminPage" parameterType="com.glxp.udi.admin.req.auth.AuthRoleQueryRequest"
resultType="com.glxp.udi.admin.entity.auth.AuthRole">
SELECT id, name, status, remark, create_time, listorder, isCustomer
FROM auth_role
<where>
<if test="status != null">
AND status = #{status}
</if>
<if test="name != null and '' != name">
AND `name` LIKE CONCAT(#{name}, '%')
</if>
</where>
</select>
<select id="listAuthAdminRolePage" resultType="com.glxp.udi.admin.entity.auth.AuthRole"> <select id="listAuthAdminRolePage" resultType="com.glxp.udi.admin.entity.auth.AuthRole">
SELECT id, name SELECT id, name

@ -122,12 +122,6 @@
WHERE customerId = #{customerId} WHERE customerId = #{customerId}
</update> </update>
<delete id="deleteById" parameterType="java.lang.Long">
delete
from customer_info
where customerId = #{customerId}
</delete>
<select id="selectCustomerIdByCustomerName" resultType="java.lang.String"> <select id="selectCustomerIdByCustomerName" resultType="java.lang.String">
select customerId select customerId
from customer_info from customer_info

@ -27,7 +27,6 @@
</where> </where>
</select> </select>
<update id="updateDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity"> <update id="updateDeviceKey" parameterType="com.glxp.udi.admin.entity.info.DeviceKeyEntity">
UPDATE device_check UPDATE device_check
<set> <set>
@ -140,16 +139,15 @@
left join customer_info customer left join customer_info customer
on device.customerId = customer.customerId on device.customerId = customer.customerId
<where> <where>
<if test="filterDeviceKeyRequest.imei != null and filterDeviceKeyRequest.imei != ''"> <if test="imei != null and imei != ''">
AND device.imei = #{filterDeviceKeyRequest.imei} AND device.imei = #{imei}
</if> </if>
<if test="filterDeviceKeyRequest.isCheck != null and filterDeviceKeyRequest.isCheck != ''"> <if test="isCheck != null and isCheck != ''">
AND device.isCheck = #{filterDeviceKeyRequest.isCheck} AND device.isCheck = #{isCheck}
</if> </if>
<if test="filterDeviceKeyRequest.customerIds != null and filterDeviceKeyRequest.customerIds.size() != 0"> <if test="customerIds != null and customerIds.size() != 0">
AND device.customerId in AND device.customerId in
<foreach collection="filterDeviceKeyRequest.customerIds" index="index" item="item" open="(" close=")" <foreach collection="customerIds" index="index" item="item" open="(" close=")" separator=",">
separator=",">
#{item} #{item}
</foreach> </foreach>
</if> </if>

@ -2,11 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.info.PlatformDao"> <mapper namespace="com.glxp.udi.admin.dao.info.PlatformDao">
<insert id="save" parameterType="com.glxp.udi.admin.entity.info.PlatformEntity">
insert into auth_platform
(id, name, host)
values (#{id}, #{name,jdbcType=VARCHAR}, #{host,jdbcType=VARCHAR})
</insert>
<insert id="batchSave" parameterType="java.util.List"> <insert id="batchSave" parameterType="java.util.List">
replace into auth_platform replace into auth_platform
@ -18,18 +13,6 @@
</foreach> </foreach>
</insert> </insert>
<update id="update" parameterType="com.glxp.udi.admin.entity.info.PlatformEntity">
update auth_platform
<set>
<if test="name != null">
name=#{name},
</if>
<if test="host != null">
host=#{host},
</if>
</set>
where id = #{id}
</update>
<select id="get" resultType="com.glxp.udi.admin.entity.info.PlatformEntity"> <select id="get" resultType="com.glxp.udi.admin.entity.info.PlatformEntity">
select * select *

@ -8,7 +8,7 @@
where id = #{id} where id = #{id}
</update> </update>
<delete id="delete"> <delete id="deleteByIdAndOrderId">
delete delete
from io_codes_temp from io_codes_temp
where id = #{id} where id = #{id}

@ -59,7 +59,6 @@
ORDER BY updateTime DESC ORDER BY updateTime DESC
</select> </select>
<select id="filterUdiGp" parameterType="com.glxp.udi.admin.req.inout.FilterUdiInfoRequest" <select id="filterUdiGp" parameterType="com.glxp.udi.admin.req.inout.FilterUdiInfoRequest"
resultType="com.glxp.udi.admin.res.basic.UdiRelevanceResponse"> resultType="com.glxp.udi.admin.res.basic.UdiRelevanceResponse">
select udi_relevance.id, select udi_relevance.id,
@ -149,12 +148,6 @@
#{warehouseName}) #{warehouseName})
</insert> </insert>
<delete id="deleteById" parameterType="Map">
DELETE
FROM udi_relevance
WHERE id = #{id}
</delete>
<delete id="deleteByIds" parameterType="java.util.List"> <delete id="deleteByIds" parameterType="java.util.List">
DELETE DELETE
FROM udi_relevance WHERE id in FROM udi_relevance WHERE id in

@ -10,72 +10,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, code, `action`, `name` id, code, `action`, `name`
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from inv_warehouse_bussiness_type
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from inv_warehouse_bussiness_type
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
insert into inv_warehouse_bussiness_type (code, `action`, `name`
)
values (#{code,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
insert into inv_warehouse_bussiness_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">
code,
</if>
<if test="action != null">
`action`,
</if>
<if test="name != null">
`name`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="action != null">
#{action,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity">
update inv_warehouse_bussiness_type
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="action != null">
`action` = #{action,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity">
update inv_warehouse_bussiness_type
set code = #{code,jdbcType=VARCHAR},
`action` = #{action,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
update inv_warehouse_bussiness_type update inv_warehouse_bussiness_type
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
@ -139,84 +74,6 @@
) )
</foreach> </foreach>
</insert> </insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
insert into inv_warehouse_bussiness_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
code,
`action`,
`name`,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{code,jdbcType=VARCHAR},
#{action,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
code = #{code,jdbcType=VARCHAR},
`action` = #{action,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
</trim>
</insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseBussinessTypeEntity" useGeneratedKeys="true">
insert into inv_warehouse_bussiness_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="action != null">
`action`,
</if>
<if test="name != null">
`name`,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="action != null">
#{action,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="action != null">
`action` = #{action,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="selectListByCode" resultMap="BaseResultMap"> <select id="selectListByCode" resultMap="BaseResultMap">
select inv_warehouse_bussiness_type.id, inv_warehouse_bussiness_type.code, inv_warehouse_bussiness_type.action, basic_bussiness_type.name select inv_warehouse_bussiness_type.id, inv_warehouse_bussiness_type.code, inv_warehouse_bussiness_type.action, basic_bussiness_type.name

@ -8,6 +8,7 @@
<result column="userName" jdbcType="VARCHAR" property="username"/> <result column="userName" jdbcType="VARCHAR" property="username"/>
<result column="isDirector" javaType="boolean" property="isDirector"/> <result column="isDirector" javaType="boolean" property="isDirector"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
code, code,
@ -15,50 +16,7 @@
userName, userName,
isDirector isDirector
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from inv_warehouse_user
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from inv_warehouse_user
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
insert into inv_warehouse_user (code, userId, userName, isDirector)
values (#{code,jdbcType=VARCHAR}, #{userid,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, #{isDirector})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
insert into inv_warehouse_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="code != null">
code,
</if>
<if test="userid != null">
userId,
</if>
<if test="username != null">
userName,
</if>
isDirector
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="userid != null">
#{userid,jdbcType=BIGINT},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
#{isDirector}
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity"> <update id="updateByPrimaryKeySelective" parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity">
update inv_warehouse_user update inv_warehouse_user
<set> <set>
@ -75,13 +33,7 @@
isDirector = #{isDirector} isDirector = #{isDirector}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity">
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>
<update id="updateBatch" parameterType="java.util.List"> <update id="updateBatch" parameterType="java.util.List">
update inv_warehouse_user update inv_warehouse_user
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
@ -106,6 +58,7 @@
#{item.id,jdbcType=INTEGER} #{item.id,jdbcType=INTEGER}
</foreach> </foreach>
</update> </update>
<update id="updateBatchSelective" parameterType="java.util.List"> <update id="updateBatchSelective" parameterType="java.util.List">
update inv_warehouse_user update inv_warehouse_user
<trim prefix="set" suffixOverrides=","> <trim prefix="set" suffixOverrides=",">
@ -136,6 +89,7 @@
#{item.id,jdbcType=INTEGER} #{item.id,jdbcType=INTEGER}
</foreach> </foreach>
</update> </update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true"> <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
insert into inv_warehouse_user insert into inv_warehouse_user
(code, userId, userName, isDirector) (code, userId, userName, isDirector)
@ -145,38 +99,7 @@
#{item.isDirector}) #{item.isDirector})
</foreach> </foreach>
</insert> </insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
insert into inv_warehouse_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
code,
userId,
userName,
isDirector,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{code,jdbcType=VARCHAR},
#{userid,jdbcType=BIGINT},
#{username,jdbcType=VARCHAR},
#{isDirector}
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
code = #{code,jdbcType=VARCHAR},
userId = #{userid,jdbcType=BIGINT},
userName = #{username,jdbcType=VARCHAR},
</trim>
</insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" <insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true"> parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
insert into inv_warehouse_user insert into inv_warehouse_user
@ -238,6 +161,7 @@
from inv_warehouse_user from inv_warehouse_user
where userId = #{userId} where userId = #{userId}
</select> </select>
<delete id="deleteByCode"> <delete id="deleteByCode">
delete delete
from inv_warehouse_user from inv_warehouse_user

@ -42,7 +42,7 @@
</select> </select>
<select id="selectMaxCode" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest" <select id="selectMaxCode" parameterType="com.glxp.udi.admin.req.inventory.FilterInvWarehouseRequest"
resultType="com.glxp.udi.admin.entity.inventory.InvWarehouseEntity"> resultType="java.lang.String">
select max(code) as code select max(code) as code
from inv_warehouse from inv_warehouse
<where> <where>

@ -12,7 +12,7 @@
#{printCodeIdFk}, #{stockOrderFk}, #{genKey}) #{printCodeIdFk}, #{stockOrderFk}, #{genKey})
</insert> </insert>
<delete id="delete" parameterType="com.glxp.udi.admin.req.inventory.DeleteStPrintTempRequest"> <delete id="deleteByParams" parameterType="com.glxp.udi.admin.req.inventory.DeleteStPrintTempRequest">
DELETE DELETE
FROM inv_stockprint_pdf_temp FROM inv_stockprint_pdf_temp
<where> <where>

@ -3,7 +3,7 @@
<mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFModuleDao"> <mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFModuleDao">
<update id="updateById" parameterType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity"> <update id="updateByParam" parameterType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity">
UPDATE system_pdf_module UPDATE system_pdf_module
<set> <set>
<if test="name != null"> <if test="name != null">
@ -37,18 +37,6 @@
WHERE id = #{id} WHERE id = #{id}
</update> </update>
<insert id="insertData" parameterType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity">
insert INTO system_pdf_module(name, param, fieldExplain, remark, templateId, create_time, update_time,
templateDlUrl, templateType)
values (#{name},
#{param},
#{fieldExplain},
#{templateId},
#{remark},
#{create_time},
#{update_time}, #{templateDlUrl}, #{templateType})
</insert>
<select id="listPDFModules" parameterType="java.lang.Integer" <select id="listPDFModules" parameterType="java.lang.Integer"
resultType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity"> resultType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity">
SELECT id, name SELECT id, name

@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFTemplateDao"> <mapper namespace="com.glxp.udi.admin.dao.param.SystemPDFTemplateDao">
<update id="updateById" parameterType="com.glxp.udi.admin.entity.param.SystemPDFTemplateEntity"> <update id="updateByParams" parameterType="com.glxp.udi.admin.entity.param.SystemPDFTemplateEntity">
UPDATE system_pdf_template UPDATE system_pdf_template
<set> <set>
<if test="name != null"> <if test="name != null">

Loading…
Cancel
Save