Commit 897f7daa authored by Quxl's avatar Quxl

x

parent 218ad12b
...@@ -195,16 +195,16 @@ public class AddressController { ...@@ -195,16 +195,16 @@ public class AddressController {
@ApiOperation("获取默认地址") @ApiOperation("获取默认地址")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "shopNO", dataType = "String", required = true, value = "店铺编码", defaultValue = ""), @ApiImplicitParam(paramType = "query", name = "shopNo", dataType = "String", required = true, value = "店铺编码", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "userNO", dataType = "String", required = true, value = "用户编码", defaultValue = ""), @ApiImplicitParam(paramType = "query", name = "custNo", dataType = "String", required = true, value = "用户编码", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = false, value = "终端标识", defaultValue = "wechat"), @ApiImplicitParam(paramType = "query", name = "terminal", dataType = "String", required = false, value = "终端标识", defaultValue = "wechat"),
@ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"), @ApiImplicitParam(paramType = "query", name = "langID", dataType = "String", required = false, value = "语言", defaultValue = "936"),
@ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""), @ApiImplicitParam(paramType = "query", name = "sign", dataType = "String", required = true, value = "签名", defaultValue = ""),
@ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "") @ApiImplicitParam(paramType = "query", name = "timestamp", dataType = "String", required = true, value = "时间戳", defaultValue = "")
}) })
@RequestMapping(value = "/getDefaultAddress",method=RequestMethod.GET) @RequestMapping(value = "/getDefaultAddress",method=RequestMethod.GET)
public String getDefaultAddress(String userNO, String shopNO) { public String getDefaultAddress(String custNo, String shopNo) {
Map<String, Object> map = addressService.getDefaultAddress(userNO, shopNO); Map<String, Object> map = addressService.getDefaultAddress(custNo, shopNo);
return Rjx.jsonOk().setData(map).toJson(); return Rjx.jsonOk().setData(map).toJson();
} }
......
...@@ -233,7 +233,25 @@ public class AddressServiceImpl implements AddressService { ...@@ -233,7 +233,25 @@ public class AddressServiceImpl implements AddressService {
@Override @Override
public Map<String, Object> getDefaultAddress(String custNo, String shopNo) { public Map<String, Object> getDefaultAddress(String custNo, String shopNo) {
String sql = "select * from tCustAddress where nTag&1 = 0 and sCustNO = ? and (sShopNO = ? or sShopNO is null or sShopNO = '') order by nTag desc"; String sql = ""
+ "select "
+ "addrID=t.sAddrID, "
+ "addrName=t.sAddrName, "
+ "contacts=t.sContacts, "
+ "mobile=t.sMobile, "
+ "tel=t.sTel, "
+ "province=t.sProvince, "
+ "city=t.sCity, "
+ "districtID=t.sDistrictID, "
+ "provinceID=t.sProvinceID, "
+ "cityID=t.sCityID, "
+ "district=t.sDistrict, "
+ "address=t.sAddress, "
+ "street=t.sStreet, "
+ "postalcode=t.sPostalcode, "
+ "tag=t.nTag, "
+ "lastUpdateTime = t.dLastUpdateTime "
+ " from tCustAddress where nTag&1 = 0 and sCustNO = ? and (sShopNO = ? or sShopNO is null or sShopNO = '') order by nTag desc";
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, custNo, shopNo); List<Map<String, Object>> list = jdbcTemplate.queryForList(sql, custNo, shopNo);
Map<String, Object> defMap = null; Map<String, Object> defMap = null;
Integer nTag_Cur = 0; Integer nTag_Cur = 0;
......
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