代码备份

cert
anthonywj 2 years ago
parent cfeff46efb
commit 104c27539e

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

@ -74,6 +74,11 @@ public class UserComanyController extends BaseController {
@Resource
UserCompanyOnlineService userCompanyOnlineService;
/**
* 线
* @param filterUserComapanyRequest
* @return
*/
@AuthRuleAnnotation("")
@GetMapping("udi/auth/user/comapny/status/filter")
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.service.sup.UserCompanyOnlineService;
import com.glxp.api.util.BeanCopyUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@Api(tags = "心跳任务接口")
@RestController
@Slf4j
public class UserOnLineController {

@ -12,6 +12,7 @@ import com.glxp.api.res.trace.TraceTaskDlResponse;
import com.glxp.api.service.trace.TraceTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
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.trace.*;
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.trace.TraceSearchReponse;
import com.glxp.api.service.basic.BasicUdiRelService;
@ -84,9 +87,10 @@ public class UdiTraceController extends BaseController {
@Resource
private final RabbitTemplate rabbitTemplate;
@PostMapping("/udi/trace/source/message")
public BaseResponse sendMessage(@RequestBody MqTraceMessage mqTraceMessage) {
String messageJson = JSON.toJSONString(mqTraceMessage);
@ApiIgnore
@GetMapping("/udi/trace/source/sendUDI")
public BaseResponse sendUdi(@RequestBody TraceRecordRequest traceRecordRequest) {
String messageJson = JSON.toJSONString(traceRecordRequest);
System.out.println(messageJson);
rabbitTemplate.convertAndSend("trace.topic.exchange", TopicRabbitConfig.common, messageJson);
return ResultVOUtils.success("发送成功");

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

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

@ -4,9 +4,9 @@ server:
spring:
datasource:
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
password: Glxp@6066
password: 123456
hikari:
connection-timeout: 60000
maximum-pool-size: 20

Loading…
Cancel
Save