Commit 2452c0df authored by lining's avatar lining

feat: 逻辑删除地址

parent 2c39527e
...@@ -41,6 +41,7 @@ public class BizConstants { ...@@ -41,6 +41,7 @@ public class BizConstants {
public static class CommonConstants { public static class CommonConstants {
public static final String RELEASE_STATUS = "releaseStatus"; public static final String RELEASE_STATUS = "releaseStatus";
public static final String DELETED = "deleted";
} }
} }
...@@ -58,7 +58,8 @@ public class ServiceAddressService extends AbstractMapper<ServiceAddress> { ...@@ -58,7 +58,8 @@ public class ServiceAddressService extends AbstractMapper<ServiceAddress> {
log.info("address selectById id: {}, userId: {}", id, userId); log.info("address selectById id: {}, userId: {}", id, userId);
Condition c = new Condition(ServiceAddress.class); Condition c = new Condition(ServiceAddress.class);
c.createCriteria().andEqualTo("id", id).andEqualTo(BizConstants.UserConstants.ACCOUNT_NO, userId); c.createCriteria().andEqualTo("id", id).andEqualTo(BizConstants.UserConstants.ACCOUNT_NO, userId)
.andEqualTo(BizConstants.CommonConstants.DELETED, false);
List<ServiceAddress> serviceAddressList = this.selectByCondition(c); List<ServiceAddress> serviceAddressList = this.selectByCondition(c);
if (CollectionUtils.isEmpty(serviceAddressList)) { if (CollectionUtils.isEmpty(serviceAddressList)) {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<mapper namespace="com.onsiteservice.miniapp.mapper.address.ServiceAddressBizMapper"> <mapper namespace="com.onsiteservice.miniapp.mapper.address.ServiceAddressBizMapper">
<select id="selectServiceAddressPage" resultType="com.onsiteservice.entity.address.ServiceAddress"> <select id="selectServiceAddressPage" resultType="com.onsiteservice.entity.address.ServiceAddress">
select * from service_address where account_no=#{uid,jdbcType=BIGINT} select * from service_address where account_no=#{uid,jdbcType=BIGINT} and deleted = 0
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment