md
This commit is contained in:
parent
ad7b300138
commit
488ba9a301
@ -367,9 +367,12 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectMaxCustomerCodeBySite" parameterType="String" resultType="Long">
|
<select id="selectMaxCustomerCodeBySite" parameterType="String" resultType="Long">
|
||||||
select CONCAT(#{ownSiteCode},LPAD((count(1)+1),6,'0')) as code from emis_customer_user where owner_site = #{ownSiteCode}
|
select IF(max(customer_code) is NULL,CONCAT(#{ownSiteCode},LPAD('1',6,'0')),CONCAT(CONVERT(customer_code,SIGNED)+1,'')) as new_code
|
||||||
|
from emis_customer_user where owner_site = #{ownSiteCode}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- select CONCAT(#{ownSiteCode},LPAD((count(1)+1),6,'0')) as code from emis_customer_user where owner_site = #{ownSiteCode}-->
|
||||||
|
|
||||||
<!-- select max(CONVERT(customer_code,SIGNED)) as code from emis_customer_user where owner_site = #{ownSiteCode}-->
|
<!-- select max(CONVERT(customer_code,SIGNED)) as code from emis_customer_user where owner_site = #{ownSiteCode}-->
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user