md
This commit is contained in:
parent
e9127e1d60
commit
ffd413917f
@ -13,6 +13,7 @@ package com.xdadan.erp.oms.mapper;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.oms.domain.EmisCustomerAddress;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @ClassName EmisCustomerAddressMapper
|
||||
@ -78,7 +79,7 @@ public interface EmisCustomerAddressMapper extends BaseMapper<EmisCustomerAddres
|
||||
* 取消默认
|
||||
* @return
|
||||
*/
|
||||
public int cancelCustomerDefaultFlag(String customerCode);
|
||||
public int cancelCustomerDefaultFlag(@Param("customerCode") String customerCode,@Param("addressType") String addressType);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -121,8 +121,8 @@ public class EmisCustomerAddressServiceImpl implements IEmisCustomerAddressServ
|
||||
if("1".equals(defaultFlag)){
|
||||
|
||||
if(oldAddress != null ){
|
||||
// 取消对应客户所有默认
|
||||
emisCustomerAddressMapper.cancelCustomerDefaultFlag(oldAddress.getCustomerCode());
|
||||
// 取消对应客户所有默认,寄件或收件
|
||||
emisCustomerAddressMapper.cancelCustomerDefaultFlag(oldAddress.getCustomerCode(),oldAddress.getAddressType());
|
||||
}
|
||||
|
||||
// 设置当前为1
|
||||
|
||||
@ -209,7 +209,7 @@
|
||||
</update>
|
||||
|
||||
<update id="cancelCustomerDefaultFlag" parameterType="String">
|
||||
update emis_customer_address set bl_default_flag = '0' where customer_code = #{customerCode}
|
||||
update emis_customer_address set bl_default_flag = '0' where customer_code = #{customerCode} and address_type = #{addressType}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user