Commit 4ff9f21e authored by 谢希宇's avatar 谢希宇

Aidea product update by Strive Date 2020-11-03

parent 7a68ff8a
...@@ -66,6 +66,7 @@ public class Address extends Area implements Serializable { ...@@ -66,6 +66,7 @@ public class Address extends Area implements Serializable {
public Address() { public Address() {
this.delFlag = false; this.delFlag = false;
this.status = "0"; this.status = "0";
this.whether = 0L;
} }
} }
\ No newline at end of file
...@@ -137,18 +137,22 @@ public class AddressServiceImpl extends GenericServiceImpl<Address> implements A ...@@ -137,18 +137,22 @@ public class AddressServiceImpl extends GenericServiceImpl<Address> implements A
newAddress.setAreaId(address.getAreaId()); newAddress.setAreaId(address.getAreaId());
if ("1".equals(address.getWhether().toString())) { if ("1".equals(address.getWhether().toString())) {
newAddress.setWhether(address.getWhether());
HashMap<String, Object> param = new HashMap<>(); HashMap<String, Object> param = new HashMap<>();
param.put("whether", address.getWhether()); param.put("whether", address.getWhether());
param.put("openId", address.getOpenId()); param.put("openId", address.getOpenId());
//更新粉丝所有默认 //更新粉丝所有默认
addressMapper.updateWhether(param); addressMapper.updateWhether(param);
//增加默认 //增加默认
addressMapper.save(address); addressMapper.save(newAddress);
rtnJson.put("errorNo", "0"); rtnJson.put("errorNo", "0");
rtnJson.put("errorMsg", "新增成功");
} else { } else {
addressMapper.save(address); addressMapper.save(address);
rtnJson.put("errorNo", "0"); rtnJson.put("errorNo", "0");
rtnJson.put("errorMsg", "新增成功"); rtnJson.put("errorMsg", "新增成功");
} }
}catch (Exception e){ }catch (Exception e){
e.printStackTrace(); e.printStackTrace();
......
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