代码备份

cert
anthonywj 2 years ago
parent cfeff46efb
commit 104c27539e

@ -10,6 +10,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid; import javax.validation.Valid;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -59,7 +61,7 @@ import springfox.documentation.annotations.ApiIgnore;
* *
*/ */
@ApiIgnore @Api(tags = "用户登录接口")
@RestController @RestController
@Slf4j @Slf4j
public class LoginController extends BaseController { public class LoginController extends BaseController {
@ -86,6 +88,7 @@ public class LoginController extends BaseController {
* *
* @return * @return
*/ */
@ApiOperation("系统用户登录")
@PostMapping(value = "/login") @PostMapping(value = "/login")
public BaseResponse index(@RequestBody @Valid LoginRequest loginRequest, public BaseResponse index(@RequestBody @Valid LoginRequest loginRequest,
BindingResult bindingResult, BindingResult bindingResult,
@ -150,6 +153,7 @@ public class LoginController extends BaseController {
* *
* @return * @return
*/ */
@ApiIgnore
@PostMapping(value = "/pc/login") @PostMapping(value = "/pc/login")
public BaseResponse pcLogin(@RequestBody @Valid PCLoginRequest loginRequest, public BaseResponse pcLogin(@RequestBody @Valid PCLoginRequest loginRequest,
BindingResult bindingResult, BindingResult bindingResult,
@ -217,6 +221,7 @@ public class LoginController extends BaseController {
@Resource @Resource
ISysRoleService sysRoleService; ISysRoleService sysRoleService;
@ApiIgnore
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("/getInfo") @GetMapping("/getInfo")
public BaseResponse getUserInfo(HttpServletRequest request) { public BaseResponse getUserInfo(HttpServletRequest request) {
@ -245,6 +250,7 @@ public class LoginController extends BaseController {
@Resource @Resource
ISysMenuService menuService; ISysMenuService menuService;
@ApiIgnore
@GetMapping("/spms/getRouters") @GetMapping("/spms/getRouters")
public BaseResponse getRouters() { public BaseResponse getRouters() {
AuthAdmin authAdmin = getUser(); AuthAdmin authAdmin = getUser();
@ -257,6 +263,7 @@ public class LoginController extends BaseController {
* *
* @return * @return
*/ */
@ApiOperation("系统用户登出")
@PostMapping("/admin/auth/login/out") @PostMapping("/admin/auth/login/out")
public BaseResponse out() { public BaseResponse out() {
return ResultVOUtils.success(); return ResultVOUtils.success();
@ -267,6 +274,7 @@ public class LoginController extends BaseController {
* *
* @return * @return
*/ */
@ApiIgnore
@AuthRuleAnnotation("") // 需要登录验证,但是不需要权限验证时,value 值填空字符串 @AuthRuleAnnotation("") // 需要登录验证,但是不需要权限验证时,value 值填空字符串
@PostMapping("/admin/auth/login/password") @PostMapping("/admin/auth/login/password")
public BaseResponse password(@RequestBody @Valid UpdatePasswordRequest updatePasswordRequest, public BaseResponse password(@RequestBody @Valid UpdatePasswordRequest updatePasswordRequest,

@ -74,6 +74,11 @@ public class UserComanyController extends BaseController {
@Resource @Resource
UserCompanyOnlineService userCompanyOnlineService; UserCompanyOnlineService userCompanyOnlineService;
/**
* 线
* @param filterUserComapanyRequest
* @return
*/
@AuthRuleAnnotation("") @AuthRuleAnnotation("")
@GetMapping("udi/auth/user/comapny/status/filter") @GetMapping("udi/auth/user/comapny/status/filter")
public BaseResponse filterCompanyStaus(FilterUserComapanyRequest filterUserComapanyRequest) { public BaseResponse filterCompanyStaus(FilterUserComapanyRequest filterUserComapanyRequest) {

@ -6,6 +6,7 @@ import com.glxp.api.entity.sup.UserCompanyOnlineEntity;
import com.glxp.api.req.sup.UserCompanyOnlineRequest; import com.glxp.api.req.sup.UserCompanyOnlineRequest;
import com.glxp.api.service.sup.UserCompanyOnlineService; import com.glxp.api.service.sup.UserCompanyOnlineService;
import com.glxp.api.util.BeanCopyUtils; import com.glxp.api.util.BeanCopyUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
@Api(tags = "心跳任务接口")
@RestController @RestController
@Slf4j @Slf4j
public class UserOnLineController { public class UserOnLineController {

@ -12,6 +12,7 @@ import com.glxp.api.res.trace.TraceTaskDlResponse;
import com.glxp.api.service.trace.TraceTaskService; import com.glxp.api.service.trace.TraceTaskService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;

@ -17,7 +17,10 @@ import com.glxp.api.entity.basic.UdiEntity;
import com.glxp.api.entity.sup.UserCompanyEntity; import com.glxp.api.entity.sup.UserCompanyEntity;
import com.glxp.api.entity.trace.*; import com.glxp.api.entity.trace.*;
import com.glxp.api.req.basic.FilterUdiRelRequest; import com.glxp.api.req.basic.FilterUdiRelRequest;
import com.glxp.api.req.trace.*; import com.glxp.api.req.trace.TraceManuDetailRequest;
import com.glxp.api.req.trace.TraceManuOrderUploadRequest;
import com.glxp.api.req.trace.TraceOrderUploadRequest;
import com.glxp.api.req.trace.TraceRecordRequest;
import com.glxp.api.res.basic.BasicUdiRelResponse; import com.glxp.api.res.basic.BasicUdiRelResponse;
import com.glxp.api.res.trace.TraceSearchReponse; import com.glxp.api.res.trace.TraceSearchReponse;
import com.glxp.api.service.basic.BasicUdiRelService; import com.glxp.api.service.basic.BasicUdiRelService;
@ -84,9 +87,10 @@ public class UdiTraceController extends BaseController {
@Resource @Resource
private final RabbitTemplate rabbitTemplate; private final RabbitTemplate rabbitTemplate;
@PostMapping("/udi/trace/source/message") @ApiIgnore
public BaseResponse sendMessage(@RequestBody MqTraceMessage mqTraceMessage) { @GetMapping("/udi/trace/source/sendUDI")
String messageJson = JSON.toJSONString(mqTraceMessage); public BaseResponse sendUdi(@RequestBody TraceRecordRequest traceRecordRequest) {
String messageJson = JSON.toJSONString(traceRecordRequest);
System.out.println(messageJson); System.out.println(messageJson);
rabbitTemplate.convertAndSend("trace.topic.exchange", TopicRabbitConfig.common, messageJson); rabbitTemplate.convertAndSend("trace.topic.exchange", TopicRabbitConfig.common, messageJson);
return ResultVOUtils.success("发送成功"); return ResultVOUtils.success("发送成功");

@ -1,5 +1,6 @@
package com.glxp.api.req.auth; package com.glxp.api.req.auth;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotEmpty;
@ -10,9 +11,11 @@ import javax.validation.constraints.NotEmpty;
@Data @Data
public class LoginRequest { public class LoginRequest {
@ApiModelProperty(value = "用户账号", required = true)
@NotEmpty(message = "用户名不能为空") @NotEmpty(message = "用户名不能为空")
private String username; private String username;
@ApiModelProperty(value = "用户密码", required = true)
@NotEmpty(message = "密码不能为空") @NotEmpty(message = "密码不能为空")
private String password; private String password;

@ -11,91 +11,92 @@ import java.util.Date;
@ApiModel("追踪记录请求") @ApiModel("追踪记录请求")
public class TraceRecordRequest extends ListPageRequest { public class TraceRecordRequest extends ListPageRequest {
@ApiModelProperty(value = "主键") @ApiModelProperty(hidden = true)
private Long id; private Long id;
/** /**
* *
*/ */
@ApiModelProperty(value = "查询记录号") @ApiModelProperty(hidden = true)
private String recordCode; private String recordCode;
/** /**
* *
*/ */
@ApiModelProperty(value = "查询来源") @ApiModelProperty(value = "查询来源1.网页2小程序", required = true)
private Integer fromType; private Integer fromType;
/** /**
* *
*/ */
@ApiModelProperty(value = "查询者") @ApiModelProperty(value = "查询者", required = true)
private String createUser; private String createUser;
/** /**
* *
*/ */
@ApiModelProperty(value = "查询记录时间") @ApiModelProperty(hidden = true)
private Date createTime; private Date createTime;
/** /**
* *
*/ */
@ApiModelProperty(value = "更新时间") @ApiModelProperty(hidden = true)
private Date updateTime; private Date updateTime;
/** /**
* 1:2) * 1:2)
*/ */
@ApiModelProperty(value = "查询方式1:源头查询2现在检查查询)") @ApiModelProperty(hidden = true)
private Integer traceSource; private Integer traceSource;
/** /**
* UDI/ * UDI/
*/ */
@ApiModelProperty(value = "查询方案按UDI码查询/按批次号查询)") @ApiModelProperty(value = "查询方案按UDI码查询/按批次号查询)", required = true)
private Integer traceType; private Integer traceType;
/** /**
* UDI * UDI
*/ */
@ApiModelProperty(value = "UDI码") @ApiModelProperty(value = "UDI码", required = true)
private String udiCode; private String udiCode;
/** /**
* *
*/ */
@ApiModelProperty(value = "社会信用号") @ApiModelProperty(value = "社会信用号", required = true)
private String creditNum; private String creditNum;
/** /**
* *
*/ */
@ApiModelProperty(value = "注册备案人") @ApiModelProperty(value = "注册备案人", required = true)
private String ylqxzcrbarmc; private String ylqxzcrbarmc;
/** /**
* DI * DI
*/ */
@ApiModelProperty(value = "产品主DI标识") @ApiModelProperty(value = "产品主DI标识", required = true)
private String nameCode; private String nameCode;
/** /**
* *
*/ */
@ApiModelProperty(value = "产品通用名") @ApiModelProperty(value = "产品通用名", required = true)
private String cpmctymc; private String cpmctymc;
/** /**
* *
*/ */
@ApiModelProperty(value = "规格型号") @ApiModelProperty(value = "规格型号", required = true)
private String ggxh; private String ggxh;
/** /**
* *
*/ */
@ApiModelProperty(value = "生产批次号") @ApiModelProperty(value = "生产批次号", required = true)
private String batchNo; private String batchNo;
@ApiModelProperty(value = "企业id")
@ApiModelProperty(value = "注册企业ID", required = true)
private Long companyId; private Long companyId;

@ -4,9 +4,9 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.p6spy.engine.spy.P6SpyDriver driver-class-name: com.p6spy.engine.spy.P6SpyDriver
jdbc-url: jdbc:p6spy:mysql://192.168.0.66:3364/udi_cpt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true jdbc-url: jdbc:p6spy:mysql://127.0.0.1:3306/udi_cpt?allowMultiQueries=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
username: root username: root
password: Glxp@6066 password: 123456
hikari: hikari:
connection-timeout: 60000 connection-timeout: 60000
maximum-pool-size: 20 maximum-pool-size: 20

Loading…
Cancel
Save