Merge remote-tracking branch 'origin/dev' into zs
This commit is contained in:
@@ -65,22 +65,16 @@ public class LoginService {
|
||||
|
||||
|
||||
public Result wxBusinessLogin(String openId,String shopId){
|
||||
TbUserShopMsg shopMsg= tbUserShopMsgMapper.selectByPrimaryKey(Integer.valueOf(shopId));
|
||||
TbUserShopMsg shopMsg= tbUserShopMsgMapper.selectByShopIdAndOpenId(Integer.valueOf(shopId),openId);
|
||||
if(Objects.isNull(shopMsg)){
|
||||
shopMsg=new TbUserShopMsg();
|
||||
|
||||
shopMsg.setShopId(Integer.valueOf(shopId));
|
||||
shopMsg.setOpenId(openId);
|
||||
shopMsg.setCreateTime(new Date());
|
||||
shopMsg.setStatus("1");
|
||||
|
||||
|
||||
tbUserShopMsgMapper.insert(shopMsg);
|
||||
}else {
|
||||
shopMsg.setOpenId(openId);
|
||||
shopMsg.setUpdateTime(new Date());
|
||||
tbUserShopMsgMapper.updateByPrimaryKey(shopMsg);
|
||||
}
|
||||
|
||||
// 为商家绑定openid
|
||||
if (shopOpenIdMapper.countByOpenId(openId) == null) {
|
||||
TbShopOpenId shopOpenId = new TbShopOpenId();
|
||||
|
||||
Reference in New Issue
Block a user