fix: 微信登录验证码及配置修改。
This commit is contained in:
@@ -102,6 +102,10 @@
|
||||
<groupId>com.intc</groupId>
|
||||
<artifactId>intc-common-websocket</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.intc</groupId>
|
||||
<artifactId>intc-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ public class FishController extends BaseController {
|
||||
/**
|
||||
* 查询鱼类管理列表
|
||||
*/
|
||||
@SaCheckPermission("fishery:fish:list")
|
||||
// @SaCheckPermission("fishery:fish:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<FishVo> list(FishBo bo, PageQuery pageQuery) {
|
||||
return fishService.queryPageList(bo, pageQuery);
|
||||
|
||||
@@ -21,6 +21,12 @@ import com.intc.fishery.domain.vo.PondVo;
|
||||
import com.intc.fishery.domain.bo.PondBo;
|
||||
import com.intc.fishery.service.IPondService;
|
||||
import com.intc.common.mybatis.core.page.TableDataInfo;
|
||||
import com.intc.common.satoken.utils.LoginHelper;
|
||||
import com.intc.fishery.service.IAquUserService;
|
||||
import com.intc.fishery.domain.vo.AquUserVo;
|
||||
import com.intc.fishery.domain.bo.AquUserBo;
|
||||
import com.intc.system.service.ISysUserService;
|
||||
import com.intc.system.domain.vo.SysUserVo;
|
||||
|
||||
/**
|
||||
* 塘口管理
|
||||
@@ -35,11 +41,13 @@ import com.intc.common.mybatis.core.page.TableDataInfo;
|
||||
public class PondController extends BaseController {
|
||||
|
||||
private final IPondService pondService;
|
||||
private final IAquUserService aquUserService;
|
||||
private final ISysUserService sysUserService;
|
||||
|
||||
/**
|
||||
* 查询塘口管理列表
|
||||
*/
|
||||
@SaCheckPermission("fishery:pond:list")
|
||||
// @SaCheckPermission("fishery:pond:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PondVo> list(PondBo bo, PageQuery pageQuery) {
|
||||
return pondService.queryPageList(bo, pageQuery);
|
||||
@@ -71,11 +79,41 @@ public class PondController extends BaseController {
|
||||
/**
|
||||
* 新增塘口管理
|
||||
*/
|
||||
@SaCheckPermission("fishery:pond:add")
|
||||
// @SaCheckPermission("fishery:pond:add")
|
||||
@Log(title = "塘口管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PondBo bo) {
|
||||
Long currentUserId = LoginHelper.getUserId();
|
||||
|
||||
// 如果userId为空,使用当前登录用户ID
|
||||
if (bo.getUserId() == null) {
|
||||
bo.setUserId(currentUserId);
|
||||
}
|
||||
|
||||
// 确保养殖用户存在,不存在则自动创建
|
||||
AquUserVo aquUser = aquUserService.queryById(bo.getUserId());
|
||||
if (aquUser == null) {
|
||||
// 获取系统用户信息
|
||||
SysUserVo sysUser = sysUserService.selectUserById(bo.getUserId());
|
||||
if (sysUser != null) {
|
||||
// 创建养殖用户记录
|
||||
AquUserBo aquUserBo = new AquUserBo();
|
||||
aquUserBo.setId(bo.getUserId());
|
||||
aquUserBo.setIsManager(0L);
|
||||
aquUserBo.setUserName(sysUser.getUserName());
|
||||
aquUserBo.setMobilePhone(sysUser.getPhonenumber() != null ? sysUser.getPhonenumber() : "未设置");
|
||||
aquUserBo.setWarnPhoneJson("[]"); // 默认空数组
|
||||
aquUserBo.setRemark("系统自动创建");
|
||||
aquUserService.insertByBo(aquUserBo);
|
||||
}
|
||||
}
|
||||
|
||||
// 默认关闭夜间防误关功能
|
||||
if (bo.getKeepNightOpen() == null) {
|
||||
bo.setKeepNightOpen(0);
|
||||
}
|
||||
|
||||
return toAjax(pondService.insertByBo(bo));
|
||||
}
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@ public class PondBo extends BaseEntity {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
* 用户id(新增时由后端自动填充当前登录用户,前端无需传递)
|
||||
*/
|
||||
@NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
@@ -63,9 +63,9 @@ public class PondBo extends BaseEntity {
|
||||
private Date placeTime;
|
||||
|
||||
/**
|
||||
* 夜间防止误关
|
||||
* 夜间防止误关(0-关闭 1-开启,默认关闭)
|
||||
*/
|
||||
@NotNull(message = "夜间防止误关不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
// @NotNull(message = "夜间防止误关不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Integer keepNightOpen;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user