1.删除部分无用的查询

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

@ -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<DeviceKeyResponse> page = deviceKeyService.findDeviceKeyResponse(filterDeviceKeyRequest);
IPage<DeviceKeyResponse> page = deviceKeyService.findDeviceKeyResponse(filterDeviceKeyRequest);
PageSimpleResponse<DeviceKeyResponse> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(page.getTotal());
pageSimpleResponse.setList(page.getRecords());

@ -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());

@ -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();
}

@ -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<AuthRole> {
/**
*
*
* @return
*/
Page<AuthRole> listAdminPage(Page<AuthRole> page, AuthRoleQueryRequest authRoleQueryRequest);
/**
* id,name
*

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

@ -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<DeviceKeyEntity> {
* @param customerId
* @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
public interface PlatformDao extends BaseMapper<PlatformEntity> {
int save(PlatformEntity platformEntity);
int batchSave(List<PlatformEntity> list);
int update(PlatformEntity platformEntity);
Page<PlatformEntity> list(Page<PlatformEntity> page, 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);
/**
*
*
* @return
*/
List<PlatformEntity> getUnbindList(@Param("customerId") long customerId);
/**
* 访
*

@ -27,7 +27,7 @@ public interface CodesTempDao extends BaseMapper<WarehousetempEntity> {
* @param id
* @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 deleteById(@Param("id") String id);
boolean deleteByIds(@Param("ids") List<String> id);
boolean deleteByUuid(@Param("uuid") String uuid);

@ -11,22 +11,6 @@ import java.util.List;
@Mapper
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 updateBatchSelective(List<WarehouseBussinessTypeEntity> list);

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

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

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

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

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

@ -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<String> customerIds;
}

@ -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) {

@ -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<DeviceKeyResponse> findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) {
public IPage<DeviceKeyResponse> findDeviceKeyResponse(FilterDeviceKeyRequest filterDeviceKeyRequest) {
if (null == filterDeviceKeyRequest) {
return new Page<>();
}
@ -60,7 +61,7 @@ public class DeviceKeyService {
return new Page<>();
}
}
Page<DeviceKeyResponse> page = new Page<>(filterDeviceKeyRequest.getPage(), filterDeviceKeyRequest.getLimit());
return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest);
IPage<DeviceKeyResponse> page = new Page<>(filterDeviceKeyRequest.getPage(), filterDeviceKeyRequest.getLimit());
return deviceKeyDao.findDeviceKeyByCustomerId(page, filterDeviceKeyRequest.getImei(), filterDeviceKeyRequest.getIsCheck(),filterDeviceKeyRequest.getCustomerIds());
}
}

@ -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("更新成功");
}

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

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

@ -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) {

@ -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);
}
}

@ -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<InvWarehouseEntity> 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);

@ -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) {

@ -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) {

@ -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) {

@ -2,19 +2,6 @@
<!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">
<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, name

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

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

@ -2,11 +2,6 @@
<!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">
<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">
replace into auth_platform
@ -18,18 +13,6 @@
</foreach>
</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 *

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

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

@ -10,72 +10,7 @@
<sql id="Base_Column_List">
id, code, `action`, `name`
</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 inv_warehouse_bussiness_type
<trim prefix="set" suffixOverrides=",">
@ -139,84 +74,6 @@
)
</foreach>
</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 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="isDirector" javaType="boolean" property="isDirector"/>
</resultMap>
<sql id="Base_Column_List">
id,
code,
@ -15,50 +16,7 @@
userName,
isDirector
</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 inv_warehouse_user
<set>
@ -75,13 +33,7 @@
isDirector = #{isDirector}
where id = #{id,jdbcType=INTEGER}
</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 inv_warehouse_user
<trim prefix="set" suffixOverrides=",">
@ -106,6 +58,7 @@
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
<update id="updateBatchSelective" parameterType="java.util.List">
update inv_warehouse_user
<trim prefix="set" suffixOverrides=",">
@ -136,6 +89,7 @@
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
insert into inv_warehouse_user
(code, userId, userName, isDirector)
@ -145,38 +99,7 @@
#{item.isDirector})
</foreach>
</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"
parameterType="com.glxp.udi.admin.entity.inout.WarehouseUserEntity" useGeneratedKeys="true">
insert into inv_warehouse_user
@ -238,6 +161,7 @@
from inv_warehouse_user
where userId = #{userId}
</select>
<delete id="deleteByCode">
delete
from inv_warehouse_user

@ -42,7 +42,7 @@
</select>
<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
from inv_warehouse
<where>

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

@ -3,7 +3,7 @@
<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
<set>
<if test="name != null">
@ -37,18 +37,6 @@
WHERE id = #{id}
</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"
resultType="com.glxp.udi.admin.entity.param.SystemPDFModuleEntity">
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" >
<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
<set>
<if test="name != null">

Loading…
Cancel
Save