Commit 3c3834bb authored by zhangyong's avatar zhangyong

1

parent 0649971d
...@@ -101,7 +101,7 @@ public class UserController { ...@@ -101,7 +101,7 @@ public class UserController {
resultMap.put("mobile", tCustomer.getsMobile()+""); resultMap.put("mobile", tCustomer.getsMobile()+"");
resultMap.put("custTypeID", tCustomer.getsCustTypeID()+""); resultMap.put("custTypeID", tCustomer.getsCustTypeID()+"");
resultMap.put("openID", tCustomer.getsOpenID()); resultMap.put("openID", tCustomer.getsOpenID());
resultMap.put("shopList", tCustomer.getTshops()); resultMap.put("shopList", tCustomer.gettShops());
} }
return Rjx.jsonOk().setData(resultMap).toJson(); return Rjx.jsonOk().setData(resultMap).toJson();
......
...@@ -9,7 +9,7 @@ import javax.persistence.Id; ...@@ -9,7 +9,7 @@ import javax.persistence.Id;
/** /**
* @author 曲欣亮 * @author 曲欣亮
* @since 2018-10-09 * @since 2018-10-15
* @version v-1.0 * @version v-1.0
*/ */
@Entity(name="tCustomer") @Entity(name="tCustomer")
...@@ -25,12 +25,16 @@ public class TCustomer implements java.io.Serializable { ...@@ -25,12 +25,16 @@ public class TCustomer implements java.io.Serializable {
private String sPassword; private String sPassword;
private String sBindOpenID;
private String sOpenID; private String sOpenID;
private String sMobile; private String sMobile;
private String sCustTypeID; private String sCustTypeID;
private String sMiniOpenID;
private String sTel; private String sTel;
@Id @Id
...@@ -62,12 +66,13 @@ public class TCustomer implements java.io.Serializable { ...@@ -62,12 +66,13 @@ public class TCustomer implements java.io.Serializable {
private BigDecimal nPoint; private BigDecimal nPoint;
private String sWxUuid;
private String sCreateUser; private String sCreateUser;
private String sFax; private String sFax;
private List<TShop> tShops;
private List<TShop> tshops ;
/** /**
* 无参数构造方法 * 无参数构造方法
...@@ -82,9 +87,11 @@ public class TCustomer implements java.io.Serializable { ...@@ -82,9 +87,11 @@ public class TCustomer implements java.io.Serializable {
* @param sEmail * @param sEmail
* @param dCreateDate * @param dCreateDate
* @param sPassword * @param sPassword
* @param sBindOpenID
* @param sOpenID * @param sOpenID
* @param sMobile * @param sMobile
* @param sCustTypeID * @param sCustTypeID
* @param sMiniOpenID
* @param sTel * @param sTel
* @param sCustNO * @param sCustNO
* @param sHeadImgUrl * @param sHeadImgUrl
...@@ -100,17 +107,20 @@ public class TCustomer implements java.io.Serializable { ...@@ -100,17 +107,20 @@ public class TCustomer implements java.io.Serializable {
* @param dConfirmDate * @param dConfirmDate
* @param sSalesmanNO2 * @param sSalesmanNO2
* @param nPoint * @param nPoint
* @param sWxUuid
* @param sCreateUser * @param sCreateUser
* @param sFax * @param sFax
*/ */
public TCustomer(String token, String sEmail, Date dCreateDate, String sPassword, String sOpenID, String sMobile, String sCustTypeID, String sTel, String sCustNO, String sHeadImgUrl, Date dLastUpdateTime, String sSalesmanNO1, String sCustLeveTypeID, Integer nStep, Integer nTag, String sCustLeveType, String sCustType, String sConfirmUser, String sCustName, Date dConfirmDate, String sSalesmanNO2, BigDecimal nPoint, String sCreateUser, String sFax) { public TCustomer(String token, String sEmail, Date dCreateDate, String sPassword, String sBindOpenID, String sOpenID, String sMobile, String sCustTypeID, String sMiniOpenID, String sTel, String sCustNO, String sHeadImgUrl, Date dLastUpdateTime, String sSalesmanNO1, String sCustLeveTypeID, Integer nStep, Integer nTag, String sCustLeveType, String sCustType, String sConfirmUser, String sCustName, Date dConfirmDate, String sSalesmanNO2, BigDecimal nPoint, String sWxUuid, String sCreateUser, String sFax) {
this.token = token; this.token = token;
this.sEmail = sEmail; this.sEmail = sEmail;
this.dCreateDate = dCreateDate; this.dCreateDate = dCreateDate;
this.sPassword = sPassword; this.sPassword = sPassword;
this.sBindOpenID = sBindOpenID;
this.sOpenID = sOpenID; this.sOpenID = sOpenID;
this.sMobile = sMobile; this.sMobile = sMobile;
this.sCustTypeID = sCustTypeID; this.sCustTypeID = sCustTypeID;
this.sMiniOpenID = sMiniOpenID;
this.sTel = sTel; this.sTel = sTel;
this.sCustNO = sCustNO; this.sCustNO = sCustNO;
this.sHeadImgUrl = sHeadImgUrl; this.sHeadImgUrl = sHeadImgUrl;
...@@ -126,20 +136,19 @@ public class TCustomer implements java.io.Serializable { ...@@ -126,20 +136,19 @@ public class TCustomer implements java.io.Serializable {
this.dConfirmDate = dConfirmDate; this.dConfirmDate = dConfirmDate;
this.sSalesmanNO2 = sSalesmanNO2; this.sSalesmanNO2 = sSalesmanNO2;
this.nPoint = nPoint; this.nPoint = nPoint;
this.sWxUuid = sWxUuid;
this.sCreateUser = sCreateUser; this.sCreateUser = sCreateUser;
this.sFax = sFax; this.sFax = sFax;
} }
public List<TShop> getTshops() { public List<TShop> gettShops() {
return tshops; return tShops;
} }
public void setTshops(List<TShop> tshops) { public void settShops(List<TShop> tShops) {
this.tshops = tshops; this.tShops = tShops;
} }
public void setToken(String token) { public void setToken(String token) {
...@@ -174,6 +183,14 @@ public class TCustomer implements java.io.Serializable { ...@@ -174,6 +183,14 @@ public class TCustomer implements java.io.Serializable {
return sPassword; return sPassword;
} }
public void setsBindOpenID(String sBindOpenID) {
this.sBindOpenID = sBindOpenID;
}
public String getsBindOpenID() {
return sBindOpenID;
}
public void setsOpenID(String sOpenID) { public void setsOpenID(String sOpenID) {
this.sOpenID = sOpenID; this.sOpenID = sOpenID;
} }
...@@ -198,6 +215,14 @@ public class TCustomer implements java.io.Serializable { ...@@ -198,6 +215,14 @@ public class TCustomer implements java.io.Serializable {
return sCustTypeID; return sCustTypeID;
} }
public void setsMiniOpenID(String sMiniOpenID) {
this.sMiniOpenID = sMiniOpenID;
}
public String getsMiniOpenID() {
return sMiniOpenID;
}
public void setsTel(String sTel) { public void setsTel(String sTel) {
this.sTel = sTel; this.sTel = sTel;
} }
...@@ -318,6 +343,14 @@ public class TCustomer implements java.io.Serializable { ...@@ -318,6 +343,14 @@ public class TCustomer implements java.io.Serializable {
return nPoint; return nPoint;
} }
public void setsWxUuid(String sWxUuid) {
this.sWxUuid = sWxUuid;
}
public String getsWxUuid() {
return sWxUuid;
}
public void setsCreateUser(String sCreateUser) { public void setsCreateUser(String sCreateUser) {
this.sCreateUser = sCreateUser; this.sCreateUser = sCreateUser;
} }
......
...@@ -194,8 +194,8 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -194,8 +194,8 @@ public class GoodsServiceImpl implements GoodsService {
} }
if(StringUtil.isEmpty(districtID)){ if(StringUtil.isEmpty(districtID)){
TCustomer customer = userService.getCustomer(userNO, shopNO); TCustomer customer = userService.getCustomer(userNO, shopNO);
if(customer != null && customer.getTshops() != null && customer.getTshops().size()>0) { if(customer != null && customer.gettShops() != null && customer.gettShops().size()>0) {
TShop tshop = customer.getTshops().get(0); TShop tshop = customer.gettShops().get(0);
districtID = tshop.getsDistrictID(); districtID = tshop.getsDistrictID();
} }
} }
...@@ -391,7 +391,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -391,7 +391,7 @@ public class GoodsServiceImpl implements GoodsService {
//正式用户保存浏览记录 //正式用户保存浏览记录
if(!customer.getsCustLeveTypeID().equals(ShopContstrant.GUEST_LEVEL_TYPE_ID)) { if(!customer.getsCustLeveTypeID().equals(ShopContstrant.GUEST_LEVEL_TYPE_ID)) {
commonService.saveViewHistory(customer.getTshops().get(0).getsOrgNO(), terminal, shopNO, "1", goodsID); commonService.saveViewHistory(customer.gettShops().get(0).getsOrgNO(), terminal, shopNO, "1", goodsID);
} }
Map<String,Object> goodsDetailMap = jdbcTemplate.queryForMap(goodsInfoSql); Map<String,Object> goodsDetailMap = jdbcTemplate.queryForMap(goodsInfoSql);
...@@ -458,7 +458,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -458,7 +458,7 @@ public class GoodsServiceImpl implements GoodsService {
if(customer == null) { if(customer == null) {
return Rjx.jsonErr().setMessage("用户不存在").toJson(); return Rjx.jsonErr().setMessage("用户不存在").toJson();
} }
TShop shop = customer.getTshops().get(0); TShop shop = customer.gettShops().get(0);
String districtID = shop.getsDistrictID(); String districtID = shop.getsDistrictID();
......
...@@ -23,7 +23,7 @@ public class GoodsSql { ...@@ -23,7 +23,7 @@ public class GoodsSql {
public static String goodsInfoSql(TCustomer customer,Map<String, Object> map) { public static String goodsInfoSql(TCustomer customer,Map<String, Object> map) {
String goodsID=(String) map.get("goodsID"); String goodsID=(String) map.get("goodsID");
String contractNO=(String) map.get("contractNO"); String contractNO=(String) map.get("contractNO");
TShop tshop = customer.getTshops().get(0); TShop tshop = customer.gettShops().get(0);
String goodInfoSql = ""; String goodInfoSql = "";
if(customer.getsCustLeveTypeID().equals(ShopContstrant.GUEST_LEVEL_TYPE_ID)) { //游客 if(customer.getsCustLeveTypeID().equals(ShopContstrant.GUEST_LEVEL_TYPE_ID)) { //游客
goodInfoSql="SELECT TOP 1 " goodInfoSql="SELECT TOP 1 "
......
...@@ -22,7 +22,7 @@ public class SystemCtrlServiceImpl implements SystemCtrlService { ...@@ -22,7 +22,7 @@ public class SystemCtrlServiceImpl implements SystemCtrlService {
public Map<String, Object> queryTSystemCtrlByCode(String sCode,String langID) { public Map<String, Object> queryTSystemCtrlByCode(String sCode,String langID) {
try { try {
String sql = "select sDesc, sSysTypeID, sSysType, sValue1, sValue2, sValue3, sMemo from tSystemCtrl where sCode = ? and nTag&1 = 0"; String sql = "select sDesc, sSysTypeID, sSysType, sValue1, sValue2, sValue3, sMemo,sValue4,sValue5 from tSystemCtrl where sCode = ? and nTag&1 = 0";
Map<String, Object> mapRsult = jdbcTemplate.queryForMap(sql,sCode); Map<String, Object> mapRsult = jdbcTemplate.queryForMap(sql,sCode);
return mapRsult; return mapRsult;
}catch (Exception e) { }catch (Exception e) {
......
...@@ -71,7 +71,7 @@ public class UserServiceImpl implements UserService { ...@@ -71,7 +71,7 @@ public class UserServiceImpl implements UserService {
shops = jdbcTemplate.queryForBeans(shopSql, TShop.class, custNO.trim()); shops = jdbcTemplate.queryForBeans(shopSql, TShop.class, custNO.trim());
} }
tcustomer.setTshops(shops); tcustomer.settShops(shops);
return tcustomer; return tcustomer;
} catch (Exception e) { } catch (Exception e) {
...@@ -148,7 +148,7 @@ public class UserServiceImpl implements UserService { ...@@ -148,7 +148,7 @@ public class UserServiceImpl implements UserService {
List<TShop> listShop = new ArrayList<TShop>(); List<TShop> listShop = new ArrayList<TShop>();
listShop.add(tshop); listShop.add(tshop);
customer.setTshops(listShop); customer.settShops(listShop);
redisTemplate.opsForHash().put(guestRedisKey, custNO, customer); redisTemplate.opsForHash().put(guestRedisKey, custNO, customer);
Map<String,Object> map = new HashMap<String,Object>(); Map<String,Object> map = new HashMap<String,Object>();
......
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