添加耗材
This commit is contained in:
@@ -53,6 +53,34 @@ public class LoginService {
|
||||
RedisUtil redisUtil;
|
||||
|
||||
|
||||
@Autowired
|
||||
TbUserShopMsgMapper tbUserShopMsgMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Result wxBusinessLogin(String openId,String shopId){
|
||||
TbUserShopMsg shopMsg= tbUserShopMsgMapper.selectByPrimaryKey(Integer.valueOf(shopId));
|
||||
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);
|
||||
}
|
||||
|
||||
return Result.success(CodeEnum.SUCCESS,shopMsg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Result wxCustomLogin(String openId, String headImage, String nickName, String telephone, String ip) throws Exception {
|
||||
TbUserInfo userInfo = new TbUserInfo();
|
||||
|
||||
Reference in New Issue
Block a user