|
|
@ -11,10 +11,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.lottery.LotteryApplication; |
|
|
|
import com.lottery.admin.controller.AdminUserController; |
|
|
|
import com.lottery.admin.mapper.AdminIsLoginMapper; |
|
|
|
import com.lottery.admin.mapper.AdminUserDetailMapper; |
|
|
|
import com.lottery.admin.mapper.AdminUserMapper; |
|
|
|
import com.lottery.admin.mapper.AdminWinMapper; |
|
|
|
import com.lottery.admin.mapper.*; |
|
|
|
import com.lottery.admin.service.AdminUserService; |
|
|
|
import com.lottery.config.ApiConfig; |
|
|
|
import com.lottery.config.ApiConfig; |
|
|
@ -136,6 +133,8 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, User> imp |
|
|
|
redisTemplate.opsForValue().set( "token:"+token, adminLogin.getUsername(),24, TimeUnit.HOURS); |
|
|
|
return Result.success(userLoginVo); |
|
|
|
} |
|
|
|
@Autowired |
|
|
|
private IFundingMapper fundingMapper; |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean addUser(@Valid UserDto userDto) throws Exception { |
|
|
@ -184,7 +183,8 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, User> imp |
|
|
|
user.setIsDel(0); |
|
|
|
user.setCreateTime(new Date()); |
|
|
|
user.setUpdateTime(new Date()); |
|
|
|
user.setLocMarket(locMarket); |
|
|
|
String cnName = fundingMapper.updateLocMarketToCn(locMarket); |
|
|
|
user.setLocMarket(cnName); |
|
|
|
user.setPassword("123456"); // 默认密码 |
|
|
|
|
|
|
|
return this.save(user); |
|
|
@ -373,7 +373,6 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, User> imp |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private User convertToEntity(UserImportDto dto) { |
|
|
|
User user = new User(); |
|
|
|
user.setJwcode(dto.getJwcode()); |
|
|
@ -384,7 +383,8 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, User> imp |
|
|
|
user.setIsDel(0); |
|
|
|
// 查询并设置loc_market |
|
|
|
String locMarket = adminUserMapper.selectLocMarketByJwcode(dto.getJwcode()); |
|
|
|
user.setLocMarket(locMarket != null ? locMarket : "未知"); // 默认值 |
|
|
|
String s = fundingMapper.updateLocMarketToCn(locMarket); |
|
|
|
user.setLocMarket(s); // 默认值 |
|
|
|
// 设置默认密码 |
|
|
|
user.setPassword("123456"); |
|
|
|
return user; |
|
|
|