diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaLabelBind.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaLabelBind.java index 07e52a93..17f16c45 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaLabelBind.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaLabelBind.java @@ -16,47 +16,57 @@ import java.util.Date; @SuppressWarnings("serial") public class MaLabelBind { - //机具ID + /** + * 机具ID + */ @Excel(name = "机具ID") @ApiModelProperty(value = "种类id") private Long maId; - - //标签编号 + /** + * 标签编号 + */ @Excel(name = "标签编号") @ApiModelProperty(value = "种类id") private String labelCode; - - //类型ID + /** + * 类型ID + */ @Excel(name = "类型ID") @ApiModelProperty(value = "种类id") private Long typeId; - - //绑定时间 + /** + * 绑定时间 + */ @Excel(name = "绑定时间") @ApiModelProperty(value = "种类id") private Date bindTime; - - //绑定人 + /** + * 绑定人 + */ @Excel(name = "绑定人") @ApiModelProperty(value = "种类id") private String binder; - - //是否绑定(0 是, 1 否) + /** + * 是否绑定(0 是, 1 否) + */ @Excel(name = "是否绑定") @ApiModelProperty(value = "种类id") private String isBind; - - //标签类型(数据字典) + /** + * 标签类型(数据字典) + */ @Excel(name = "标签类型(数据字典)") @ApiModelProperty(value = "种类id") private Integer labelType; - - //数据所属组织 + /** + * 数据所属组织 + */ @Excel(name = "数据所属组织") @ApiModelProperty(value = "种类id") private String companyId; - - //数据所属组织 + /** + * 0已解绑 1已绑定 + */ @Excel(name = "0已解绑 1已绑定") @ApiModelProperty(value = "0已解绑 1已绑定") private String status; diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java index d40171db..fb4077ae 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachine.java @@ -6,6 +6,11 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +/** + * + * @author Dingjie + * @date + */ @ApiModel(value="com.bonus.sgzb.base.api.domain.MaMachine") @Data public class MaMachine extends BaseEntity { diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachineLabel.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachineLabel.java index 3ce57f8c..3763716d 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachineLabel.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaMachineLabel.java @@ -5,7 +5,11 @@ import com.bonus.sgzb.common.core.web.domain.BaseEntity; import io.swagger.annotations.ApiModelProperty; import lombok.Data; - +/** + * + * @author gmhao + * @date + */ @Data public class MaMachineLabel extends BaseEntity { diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java index 839f1b85..541ef487 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java @@ -14,6 +14,11 @@ import java.util.List; /** * 工机具类型管理实体类 */ +/** + * + * @author rsyao + * @date + */ @Data public class MaType extends BaseEntity { diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteLogService.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteLogService.java index 389da794..20ab7c1b 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteLogService.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteLogService.java @@ -21,10 +21,10 @@ public interface RemoteLogService { /** * 保存系统日志 - * - * @param sysOperLog 日志实体 + * @param sysOperLog 保存系统日志 * @param source 请求来源 * @return 结果 + * @throws Exception */ @PostMapping("/operlog") public R saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception; diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteUserService.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteUserService.java index 32a0a95c..ab1f07ed 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteUserService.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/system/api/RemoteUserService.java @@ -41,18 +41,26 @@ public interface RemoteUserService /** * 发送短信 + * @param phone + * @return */ @PostMapping("/sms/codeLogin") public R sendCode(@RequestParam("phone") String phone); /** * 验证码校验 + * @param phone + * @param code + * @return */ @PostMapping("/sms/checkCode") public R checkCode(@RequestParam("phone") String phone, @RequestParam("code") String code); /** * 验证码校验 + * @param phone + * @param msg + * @return */ @PostMapping("/sms/send") public Boolean send(@RequestParam("phone") String phone, @RequestParam("msg") String msg); diff --git a/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java b/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java index 48e8fd86..f10f26eb 100644 --- a/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java +++ b/sgzb-auth/src/main/java/com/bonus/sgzb/auth/controller/TokenController.java @@ -41,7 +41,11 @@ public class TokenController { @Resource private RemoteUserService remoteUserService; - //web端登录 + /** + * web端登录 + * @param form + * @return + */ @PostMapping("login") public R login(@RequestBody LoginBody form) { // 用户登录 @@ -55,8 +59,13 @@ public class TokenController { return R.fail("验证码错误"); } } + - //App端登录 + /** + * App端登录 + * @param form + * @return + */ @PostMapping("loginApp") public R loginApp(@RequestBody LoginBody form) { // 用户登录 diff --git a/sgzb-auth/src/main/java/com/bonus/sgzb/auth/service/SysLoginService.java b/sgzb-auth/src/main/java/com/bonus/sgzb/auth/service/SysLoginService.java index 79e8fba0..944357cf 100644 --- a/sgzb-auth/src/main/java/com/bonus/sgzb/auth/service/SysLoginService.java +++ b/sgzb-auth/src/main/java/com/bonus/sgzb/auth/service/SysLoginService.java @@ -147,11 +147,12 @@ public class SysLoginService } public boolean checkCode(String phone, String code) { + String a = "_"; String redisCode = redisService.getCacheObject("code_" + phone); if (StringUtils.isEmpty(redisCode)) { throw new ServiceException("验证码失效", 403); } - if (!StringUtils.equals(redisCode.split("_")[0], code)) { + if (!StringUtils.equals(redisCode.split(a)[0], code)) { throw new ServiceException("验证码错误", 401); } else { redisService.deleteObject("code_" + phone); diff --git a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/config/KaptchaTextCreator.java b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/config/KaptchaTextCreator.java index 90591c19..4727267c 100644 --- a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/config/KaptchaTextCreator.java +++ b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/config/KaptchaTextCreator.java @@ -15,7 +15,9 @@ public class KaptchaTextCreator extends DefaultTextCreator @Override public String getText() { + Integer result = 0; + int i = 2; Random random = new Random(); int x = random.nextInt(10); int y = random.nextInt(10); @@ -45,7 +47,7 @@ public class KaptchaTextCreator extends DefaultTextCreator suChinese.append(CNUMBERS[y]); } } - else if (randomoperands == 2) + else if (randomoperands == i) { if (x >= y) { diff --git a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/AuthFilter.java b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/AuthFilter.java index c142d00a..a01860c9 100644 --- a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/AuthFilter.java +++ b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/AuthFilter.java @@ -31,7 +31,9 @@ public class AuthFilter implements GlobalFilter, Ordered { private static final Logger log = LoggerFactory.getLogger(AuthFilter.class); - // 排除过滤的 uri 地址,nacos自行添加 + /** + * 排除过滤的 uri 地址,nacos自行添加 + */ @Autowired private IgnoreWhiteProperties ignoreWhite; diff --git a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/XssFilter.java b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/XssFilter.java index d69b28a4..27dacfa1 100644 --- a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/XssFilter.java +++ b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/filter/XssFilter.java @@ -35,7 +35,9 @@ import reactor.core.publisher.Mono; @ConditionalOnProperty(value = "security.xss.enabled", havingValue = "true") public class XssFilter implements GlobalFilter, Ordered { - // 跨站脚本的 xss 配置,nacos自行添加 + /** + * 跨站脚本的 xss 配置,nacos自行添加 + */ @Autowired private XssProperties xss; diff --git a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/handler/SwaggerHandler.java b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/handler/SwaggerHandler.java index 1eca4bde..42f3969c 100644 --- a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/handler/SwaggerHandler.java +++ b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/handler/SwaggerHandler.java @@ -13,7 +13,11 @@ import springfox.documentation.swagger.web.SecurityConfigurationBuilder; import springfox.documentation.swagger.web.SwaggerResourcesProvider; import springfox.documentation.swagger.web.UiConfiguration; import springfox.documentation.swagger.web.UiConfigurationBuilder; - +/** + * + * @author bonus + * @date + */ @RestController @RequestMapping("/swagger-resources") public class SwaggerHandler diff --git a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/ValidateCodeService.java b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/ValidateCodeService.java index 836be27f..28b8404c 100644 --- a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/ValidateCodeService.java +++ b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/ValidateCodeService.java @@ -13,11 +13,17 @@ public interface ValidateCodeService { /** * 生成验证码 + * @return + * @throws IOException + * @throws CaptchaException */ public AjaxResult createCaptcha() throws IOException, CaptchaException; /** * 校验验证码 + * @param key + * @param value + * @throws CaptchaException */ public void checkCaptcha(String key, String value) throws CaptchaException; } diff --git a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/impl/ValidateCodeServiceImpl.java b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/impl/ValidateCodeServiceImpl.java index e37e83bb..a30fa357 100644 --- a/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/impl/ValidateCodeServiceImpl.java +++ b/sgzb-gateway/src/main/java/com/bonus/sgzb/gateway/service/impl/ValidateCodeServiceImpl.java @@ -47,6 +47,8 @@ public class ValidateCodeServiceImpl implements ValidateCodeService @Override public AjaxResult createCaptcha() throws IOException, CaptchaException { + String math = "math"; + String charStr = "char"; AjaxResult ajax = AjaxResult.success(); boolean captchaEnabled = captchaProperties.getEnabled(); ajax.put("captchaEnabled", captchaEnabled); @@ -64,14 +66,14 @@ public class ValidateCodeServiceImpl implements ValidateCodeService String captchaType = captchaProperties.getType(); // 生成验证码 - if ("math".equals(captchaType)) + if (math.equals(captchaType)) { String capText = captchaProducerMath.createText(); capStr = capText.substring(0, capText.lastIndexOf("@")); code = capText.substring(capText.lastIndexOf("@") + 1); image = captchaProducerMath.createImage(capStr); } - else if ("char".equals(captchaType)) + else if (charStr.equals(captchaType)) { capStr = code = captchaProducer.createText(); image = captchaProducer.createImage(capStr); diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyAppMapper.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyAppMapper.java index b6ea14ae..2d4268d7 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyAppMapper.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/mapper/BackApplyAppMapper.java @@ -20,6 +20,7 @@ public interface BackApplyAppMapper { */ List getbackPro(BmAgreementInfo record); + int insertTask(TmTask task); List getbackList(BackApplyInfo record); diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/SysNoticeService.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/SysNoticeService.java index 30c2b5e7..b3f93920 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/SysNoticeService.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/SysNoticeService.java @@ -16,5 +16,10 @@ public interface SysNoticeService { */ List getList(String keyword); + /** + * 根据ID获取通知公告内容 + * @param noticeId + * @return + */ SysNotice getById(Long noticeId); } diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysSmsServiceImpl.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysSmsServiceImpl.java index 8bde3d1d..8e2bf59f 100644 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysSmsServiceImpl.java +++ b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SysSmsServiceImpl.java @@ -28,8 +28,8 @@ public class SysSmsServiceImpl implements ISysSmsService { @Resource private RedisService redisService; - // 短信url - private static final String url = "http://api.ktsms.cn/sms_token?ddtkey=bonus&secretkey=KtyBns@Admin2023!"; + // 短信URL + private static final String URL = "http://api.ktsms.cn/sms_token?ddtkey=bonus&secretkey=KtyBns@Admin2023!"; @Override public AjaxResult sendSms(String phone, String msg) { @@ -61,8 +61,8 @@ public class SysSmsServiceImpl implements ISysSmsService { } // 发送短信 try { -// String url = "http://106.ihuyi.common/webservice/sms.php?method=Submit"; - String content = url + "&mobile=" + phone + "&content=【智慧仓储】" + msg + "。"; +// String URL = "http://106.ihuyi.common/webservice/sms.php?method=Submit"; + String content = URL + "&mobile=" + phone + "&content=【智慧仓储】" + msg + "。"; String body = HttpRequest.post(content).execute(false).body(); System.out.println("发送手机号码:" + phone + ",内容:" + msg + ",返回结果:" + body); if (body == null || !body.contains("ok")) { @@ -92,7 +92,7 @@ public class SysSmsServiceImpl implements ISysSmsService { } // 发送短信 try { - String content = url + "&mobile=" + phone + "&content=【智慧仓储】您正在进行短信验证,验证码:" + code + ",请在5分钟内完成验证。"; + String content = URL + "&mobile=" + phone + "&content=【智慧仓储】您正在进行短信验证,验证码:" + code + ",请在5分钟内完成验证。"; String body = HttpRequest.post(content).execute(false).body(); System.out.println("发送短信:" + phone + ",验证码:" + code + ",返回结果:" + body); if (body == null || !body.contains("ok")) {