Browse Source

客户编码BUG修复

dist.1.3.0
汤建军 7 months ago
parent
commit
e92ac0bbef
  1. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.java
  2. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml
  3. 2
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.java

@ -75,6 +75,6 @@ public interface BasicdataClientMapper extends BaseMapper<BasicdataClientEntity>
* 查询规则生成的客户编码列表 * 查询规则生成的客户编码列表
* @return * @return
*/ */
List<String> getFinallyClientCode(); List<String> getFinallyClientCode(@Param("tenantCode")String tenantCode);
} }

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataClientMapper.xml

@ -169,7 +169,7 @@
DESC DESC
</select> </select>
<select id="getFinallyClientCode" resultType="java.lang.String"> <select id="getFinallyClientCode" resultType="java.lang.String">
SELECT client_code FROM `logpm_basicdata_client` WHERE is_deleted = 0 AND client_code LIKE 'HT00%' AND LENGTH(client_code) = 9 AND is_deleted = 0 ORDER BY client_code DESC SELECT client_code FROM `logpm_basicdata_client` WHERE is_deleted = 0 AND client_code LIKE CONCAT(#{tenantCode},'%') AND LENGTH(client_code) = 9 AND is_deleted = 0 ORDER BY client_code DESC
</select> </select>
</mapper> </mapper>

2
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientServiceImpl.java

@ -688,7 +688,7 @@ public class BasicdataClientServiceImpl extends BaseServiceImpl<BasicdataClientM
String finaClientCode = redis.get(RedisKeyConstant.FINAL_CLIENT_CODE + AuthUtil.getTenantId()); String finaClientCode = redis.get(RedisKeyConstant.FINAL_CLIENT_CODE + AuthUtil.getTenantId());
if (StringUtils.isBlank(finaClientCode)) { if (StringUtils.isBlank(finaClientCode)) {
List<String> str = baseMapper.getFinallyClientCode(); List<String> str = baseMapper.getFinallyClientCode(tenantCode);
if(!str.isEmpty()){ if(!str.isEmpty()){
finaClientCode = str.get(0); finaClientCode = str.get(0);
}else{ }else{

Loading…
Cancel
Save