改变pom
parent
5f165a6cd5
commit
45f14a6048
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
|
|
|
@ -3,9 +3,10 @@ package com.fate.firm.domain;
|
|||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fate.common.core.annotation.Excel;
|
||||
import com.fate.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -27,8 +28,8 @@ import java.util.Date;
|
|||
public class Firm extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Excel(name = "企业主键",cellType = Excel.ColumnType.NUMERIC)
|
||||
@TableId( type = IdType.AUTO)
|
||||
@Excel(name = "企业主键", cellType = Excel.ColumnType.NUMERIC)
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer firmId;
|
||||
|
||||
@Excel(name = "企业名称")
|
||||
|
@ -64,7 +65,7 @@ public class Firm extends BaseEntity {
|
|||
private String updateBy;
|
||||
|
||||
@Excel(name = "修改时间")
|
||||
@TableField(value = "update_time",fill = FieldFill.INSERT)
|
||||
@TableField(value = "update_time", fill = FieldFill.INSERT)
|
||||
private Date updateTime;
|
||||
|
||||
@Excel(name = "备注")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
|
|
|
@ -5,10 +5,6 @@ import com.fate.common.security.annotation.EnableMyFeignClients;
|
|||
import com.fate.common.swagger.annotation.EnableCustomSwagger2;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
|
@ -21,6 +17,6 @@ import javax.swing.*;
|
|||
@SpringBootApplication
|
||||
public class FirmApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(FirmApplication.class,args);
|
||||
SpringApplication.run(FirmApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,14 +3,11 @@ package com.fate.firm.controller;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fate.common.core.domain.Result;
|
||||
import com.fate.common.core.web.controller.BaseController;
|
||||
import com.fate.firm.domain.Firm;
|
||||
import com.fate.firm.service.FirmService;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.apache.http.HttpHeaders;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
@ -38,69 +35,70 @@ public class FirmController extends BaseController {
|
|||
|
||||
/**
|
||||
* 添加企业入驻
|
||||
*
|
||||
* @author: ZhuoXin
|
||||
* @date: 2023/11/20 10:45
|
||||
* @param: [firm]
|
||||
* @return: com.fate.common.core.domain.Result
|
||||
**/
|
||||
@PostMapping("/addFirm")
|
||||
public Result addFirm(@RequestBody Firm firm) {
|
||||
log.info("功能:添加企业入驻,URI:{},方法:{},参数:{}",request.getRequestURI(),request.getMethod(),JSON.toJSONString(firm));
|
||||
Result result = firmService.addFirm(firm);
|
||||
log.info("功能:查询我的公司,URI:{},方法:{},响应:{}",request.getRequestURI(),request.getMethod(), JSON.toJSONString(result.getData()));
|
||||
public Result addFirm(@RequestBody Firm firm) {
|
||||
log.info("功能:添加企业入驻,URI:{},方法:{},参数:{}", request.getRequestURI(), request.getMethod(), JSON.toJSONString(firm));
|
||||
Result result = firmService.addFirm(firm);
|
||||
log.info("功能:查询我的公司,URI:{},方法:{},响应:{}", request.getRequestURI(), request.getMethod(), JSON.toJSONString(result.getData()));
|
||||
return Result.success("成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改信息
|
||||
*
|
||||
* @author: ZhuoXin
|
||||
* @date: 2023/11/20 13:19
|
||||
* @param: [firm]
|
||||
* @return: com.fate.common.core.domain.Result
|
||||
**/
|
||||
@PostMapping("/updateFirm")
|
||||
public Result updateLL(@RequestBody Firm firm){
|
||||
log.info("功能:修改信息,URI:{},方法:{},参数:{}",request.getRequestURI(),request.getMethod(),JSON.toJSONString(firm));
|
||||
Result result =firmService.updateFirm(firm);
|
||||
log.info("功能:修改信息,URI:{},方法:{},参数:{}",request.getRequestURI(),request.getMethod(),JSON.toJSONString(result.getData()));
|
||||
return result;
|
||||
public Result updateLL(@RequestBody Firm firm) {
|
||||
log.info("功能:修改信息,URI:{},方法:{},参数:{}", request.getRequestURI(), request.getMethod(), JSON.toJSONString(firm));
|
||||
Result result = firmService.updateFirm(firm);
|
||||
log.info("功能:修改信息,URI:{},方法:{},参数:{}", request.getRequestURI(), request.getMethod(), JSON.toJSONString(result.getData()));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/updateStatus")
|
||||
public Result updateStatus(@RequestBody Firm firm){
|
||||
log.info("功能:修改状态,URI:{},方法:{},参数:{}",request.getRequestURI(),request.getMethod(),JSON.toJSONString(firm));
|
||||
public Result updateStatus(@RequestBody Firm firm) {
|
||||
log.info("功能:修改状态,URI:{},方法:{},参数:{}", request.getRequestURI(), request.getMethod(), JSON.toJSONString(firm));
|
||||
Result result = firmService.updateStatus(firm);
|
||||
log.info("功能:修改状态,URI:{},方法:{},响应:{}",request.getRequestURI(),request.getMethod(),JSON.toJSONString(firm));
|
||||
return result;
|
||||
log.info("功能:修改状态,URI:{},方法:{},响应:{}", request.getRequestURI(), request.getMethod(), JSON.toJSONString(firm));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
public Result<List<Firm>> list(@RequestBody Firm firm){
|
||||
List<Firm> list = firmService.listSel(firm);
|
||||
public Result<List<Firm>> list(@RequestBody Firm firm) {
|
||||
List<Firm> list = firmService.listSel(firm);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @author: ZhuoXin
|
||||
* @date: 2023/11/20 10:24
|
||||
* @param: []
|
||||
* @return: com.fate.common.core.domain.Result<java.util.List<com.fate.firm.domain.Firm>>
|
||||
* @return: com.fate.common.core.domain.Result<java.util.List < com.fate.firm.domain.Firm>>
|
||||
**/
|
||||
@GetMapping("/listAll")
|
||||
public Result<List<Firm>> listAll(){
|
||||
log.info("功能:查询我的公司,URI:{},方法:{}",request.getRequestURI(),request.getMethod());
|
||||
public Result<List<Firm>> listAll() {
|
||||
log.info("功能:查询我的公司,URI:{},方法:{}", request.getRequestURI(), request.getMethod());
|
||||
LambdaQueryWrapper<Firm> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(Firm::getCreateBy,"1");
|
||||
queryWrapper.like(Firm::getCreateBy, "1");
|
||||
List<Firm> list = firmService.list(queryWrapper);
|
||||
log.info("功能:查询我的公司,URI:{},方法:{},响应:{}",request.getRequestURI(),request.getMethod(), JSON.toJSONString(list));
|
||||
log.info("功能:查询我的公司,URI:{},方法:{},响应:{}", request.getRequestURI(), request.getMethod(), JSON.toJSONString(list));
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
package com.fate.firm.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
import com.fate.firm.domain.Firm;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 企业公司 Mapper 接口
|
||||
|
|
|
@ -4,11 +4,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fate.common.core.domain.Result;
|
||||
import com.fate.common.core.utils.StringUtils;
|
||||
import com.fate.common.security.utils.SecurityUtils;
|
||||
import com.fate.firm.domain.Firm;
|
||||
import com.fate.firm.mapper.FirmMapper;
|
||||
import com.fate.firm.service.FirmService;
|
||||
import org.apache.poi.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
@ -27,7 +25,7 @@ import java.util.List;
|
|||
public class FirmServiceImpl extends ServiceImpl<FirmMapper, Firm> implements FirmService {
|
||||
|
||||
@Autowired
|
||||
private FirmMapper firmMapper;
|
||||
private FirmMapper firmMapper;
|
||||
|
||||
@Override
|
||||
public Result addFirm(Firm firm) {
|
||||
|
@ -38,7 +36,7 @@ public class FirmServiceImpl extends ServiceImpl<FirmMapper, Firm> implements Fi
|
|||
firm.setUpdateTime(null);
|
||||
firm.setFirmStaus(1); // 1提交 2 审核 3通过 4驳回
|
||||
int insert = firmMapper.insert(firm);
|
||||
return insert>0?Result.success("成功"):Result.error("失败");
|
||||
return insert > 0 ? Result.success("成功") : Result.error("失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,20 +45,20 @@ public class FirmServiceImpl extends ServiceImpl<FirmMapper, Firm> implements Fi
|
|||
firm.setUpdateTime(new Date());
|
||||
firm.setFirmStaus(2);
|
||||
int i = firmMapper.updateById(firm);
|
||||
return i>0?Result.success("成功"):Result.error("失败");
|
||||
return i > 0 ? Result.success("成功") : Result.error("失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Firm> listSel(Firm firm) {
|
||||
LambdaQueryWrapper<Firm> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if(StringUtils.isNotEmpty(firm.getFirmAddress())){
|
||||
queryWrapper.like(Firm::getFirmAddress,firm.getFirmAddress());
|
||||
if (StringUtils.isNotEmpty(firm.getFirmAddress())) {
|
||||
queryWrapper.like(Firm::getFirmAddress, firm.getFirmAddress());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(firm.getFirmPhone())){
|
||||
queryWrapper.like(Firm::getFirmPhone,firm.getFirmPhone());
|
||||
if (StringUtils.isNotEmpty(firm.getFirmPhone())) {
|
||||
queryWrapper.like(Firm::getFirmPhone, firm.getFirmPhone());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(firm.getFirmName())){
|
||||
queryWrapper.like(Firm::getFirmName,firm.getFirmName());
|
||||
if (StringUtils.isNotEmpty(firm.getFirmName())) {
|
||||
queryWrapper.like(Firm::getFirmName, firm.getFirmName());
|
||||
}
|
||||
List<Firm> list = firmMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
|
@ -71,7 +69,7 @@ public class FirmServiceImpl extends ServiceImpl<FirmMapper, Firm> implements Fi
|
|||
firm.setUpdateBy("1");
|
||||
firm.setUpdateTime(new Date());
|
||||
int insert = firmMapper.insert(firm);
|
||||
return insert>0?Result.success("成功"):Result.error("失败");
|
||||
return insert > 0 ? Result.success("成功") : Result.error("失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true" scanPeriod="60 seconds" debug="false">
|
||||
<!-- 日志存放路径 -->
|
||||
<property name="log.path" value="./logs/fate/firm" />
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
|
||||
<property name="log.path" value="./logs/fate/firm"/>
|
||||
<!-- 日志输出格式 -->
|
||||
<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"/>
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 系统日志输出 -->
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/info.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<fileNamePattern>${log.path}/info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>INFO</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
|
@ -33,16 +33,16 @@
|
|||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
</appender>
|
||||
|
||||
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/error.log</file>
|
||||
<file>${log.path}/error.log</file>
|
||||
<!-- 循环政策:基于时间创建日志文件 -->
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!-- 日志文件名格式 -->
|
||||
<fileNamePattern>${log.path}/error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
<!-- 日志最大的历史 60天 -->
|
||||
<maxHistory>60</maxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>${log.pattern}</pattern>
|
||||
|
@ -50,25 +50,25 @@
|
|||
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||
<!-- 过滤的级别 -->
|
||||
<level>ERROR</level>
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<!-- 匹配时的操作:接收(记录) -->
|
||||
<onMatch>ACCEPT</onMatch>
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<!-- 不匹配时的操作:拒绝(不记录) -->
|
||||
<onMismatch>DENY</onMismatch>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 系统模块日志级别控制 -->
|
||||
<logger name="com.bawei" level="info" />
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn" />
|
||||
<logger name="com.bawei" level="info"/>
|
||||
<!-- Spring日志级别控制 -->
|
||||
<logger name="org.springframework" level="warn"/>
|
||||
|
||||
<root level="info">
|
||||
<appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info" />
|
||||
<appender-ref ref="file_error" />
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
|
||||
<!--系统操作日志-->
|
||||
<root level="info">
|
||||
<appender-ref ref="file_info"/>
|
||||
<appender-ref ref="file_error"/>
|
||||
</root>
|
||||
</configuration>
|
||||
|
|
Loading…
Reference in New Issue