Commit 3c3834bb authored by zhangyong's avatar zhangyong

1

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