更新用户信息 头像/昵称
视频号/小程序/公众号mapper 暂未投入使用
This commit is contained in:
@@ -123,7 +123,11 @@ public class LoginService {
|
||||
tbShopUser.setUserId(userInfo.getId().toString());
|
||||
tbShopUser.setMiniOpenId(openId);
|
||||
tbShopUser.setCreatedAt(System.currentTimeMillis());
|
||||
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
||||
tbShopUserMapper.insert(tbShopUser);
|
||||
}else {
|
||||
tbShopUser.setUpdatedAt(System.currentTimeMillis());
|
||||
tbShopUserMapper.updateByPrimaryKey(tbShopUser);
|
||||
}
|
||||
shopMap.put("shopId", tbShopUser.getShopId());
|
||||
shopMap.put("name", tbShopInfo.getShopName());
|
||||
@@ -304,6 +308,11 @@ public class LoginService {
|
||||
return Result.success(CodeEnum.ENCRYPT, map);
|
||||
}
|
||||
|
||||
public Result upUserInfo(TbUserInfo userInfo){
|
||||
tbUserInfoMapper.updateByPrimaryKeySelective(userInfo);
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
System.out.println(RandomUtil.randomNumbers(10));
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.dao.TbShopVideoMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopVideo;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 视频号 公众号
|
||||
* @author ww
|
||||
* @since 2024-04-12 14:50:10
|
||||
*/
|
||||
public class TbShopVideoService {
|
||||
|
||||
@Resource
|
||||
private TbShopVideoMapper tbShopVideoMapper;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
public Result queryById(Integer id) {
|
||||
return Result.success(CodeEnum.ENCRYPT,tbShopVideoMapper.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param tbShopVideo 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
public Result queryAll(TbShopVideo tbShopVideo) {
|
||||
tbShopVideo.setStatus(1);
|
||||
return Result.success(CodeEnum.ENCRYPT,tbShopVideoMapper.queryAll(tbShopVideo));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user