master
parent
a103801256
commit
0c48257895
|
@ -35,7 +35,7 @@ public class FirmInfo {
|
||||||
* 企业电话
|
* 企业电话
|
||||||
*/
|
*/
|
||||||
private String firmTel;
|
private String firmTel;
|
||||||
/**
|
/**3
|
||||||
* 企业详细地址
|
* 企业详细地址
|
||||||
*/
|
*/
|
||||||
private String firmAddress;
|
private String firmAddress;
|
||||||
|
@ -71,6 +71,21 @@ public class FirmInfo {
|
||||||
* 统一社会信用代码
|
* 统一社会信用代码
|
||||||
*/
|
*/
|
||||||
private String firmSocialCredit;
|
private String firmSocialCredit;
|
||||||
|
/**
|
||||||
|
* 企业激活状态
|
||||||
|
* 0 未激活 1 激活
|
||||||
|
* 默认为0
|
||||||
|
*/
|
||||||
|
private Integer firmActiveStatus;
|
||||||
|
/**
|
||||||
|
* 企业审核状态
|
||||||
|
* 0 待审核 1审核通过 2 审核驳回
|
||||||
|
* 默认为0
|
||||||
|
*/
|
||||||
|
private Integer firmExamineStatus;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static FirmInfo addReqBuild(FirmAddReq firmAddReq){
|
public static FirmInfo addReqBuild(FirmAddReq firmAddReq){
|
||||||
return FirmInfo.builder()
|
return FirmInfo.builder()
|
||||||
|
|
|
@ -14,7 +14,7 @@ import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/firm")
|
@RequestMapping("/company/firm")
|
||||||
public class FirmController {
|
public class FirmController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -69,6 +69,27 @@ public class FirmController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改激活状态
|
||||||
|
* @param firmInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/updatefirmActivateStatus}")
|
||||||
|
public Result updatefirmActivateStatus(@RequestBody FirmInfo firmInfo){
|
||||||
|
firmService.updateActivateStatus(firmInfo);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核通过
|
||||||
|
* @param firmInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/updateExamineStatus")
|
||||||
|
public Result updateExamineStaus(@RequestBody FirmInfo firmInfo){
|
||||||
|
firmService.updateExamineStatus(firmInfo);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,12 @@ package com.dragon.vehicle.company.server.mapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.dragon.vehicle.company.common.domain.FirmInfo;
|
import com.dragon.vehicle.company.common.domain.FirmInfo;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface FirmMapper extends BaseMapper<FirmInfo> {
|
public interface FirmMapper extends BaseMapper<FirmInfo> {
|
||||||
|
|
||||||
|
void updateActivateStatus(@Param("firmId") Integer firmId);
|
||||||
|
|
||||||
|
void updateExamineStatus(@Param("firmId") Integer firmId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,4 +14,8 @@ public interface FirmService extends IService<FirmInfo> {
|
||||||
*/
|
*/
|
||||||
TableDataInfo<FirmInfo> selectFirmList(FirmQueryReq firmQueryReq);
|
TableDataInfo<FirmInfo> selectFirmList(FirmQueryReq firmQueryReq);
|
||||||
|
|
||||||
|
|
||||||
|
void updateActivateStatus(FirmInfo firmInfo);
|
||||||
|
|
||||||
|
void updateExamineStatus(FirmInfo firmInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.dragon.vehicle.company.common.utils.BaiDuAiCheck;
|
||||||
import com.dragon.vehicle.company.server.mapper.FirmMapper;
|
import com.dragon.vehicle.company.server.mapper.FirmMapper;
|
||||||
import com.dragon.vehicle.company.server.service.FirmService;
|
import com.dragon.vehicle.company.server.service.FirmService;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
@ -22,8 +23,15 @@ import java.io.Serializable;
|
||||||
@Service
|
@Service
|
||||||
public class FirmServiceImpl extends ServiceImpl<FirmMapper, FirmInfo> implements FirmService {
|
public class FirmServiceImpl extends ServiceImpl<FirmMapper, FirmInfo> implements FirmService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private FirmMapper firmMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加企业
|
||||||
|
* @param entity
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean save(FirmInfo entity) {
|
public boolean save(FirmInfo entity) {
|
||||||
|
|
||||||
|
@ -48,10 +56,9 @@ public class FirmServiceImpl extends ServiceImpl<FirmMapper, FirmInfo> implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改企业
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param entity
|
* @param entity
|
||||||
* @return
|
* @return
|
||||||
|
@ -66,7 +73,9 @@ public class FirmServiceImpl extends ServiceImpl<FirmMapper, FirmInfo> implement
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* 删除企业
|
||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -132,4 +141,19 @@ public class FirmServiceImpl extends ServiceImpl<FirmMapper, FirmInfo> implement
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateActivateStatus(FirmInfo firmInfo) {
|
||||||
|
if (firmInfo.getFirmName()!=null){
|
||||||
|
firmMapper.updateActivateStatus(firmInfo.getFirmId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateExamineStatus(FirmInfo firmInfo) {
|
||||||
|
if (firmInfo.getFirmActiveStatus().equals(1)){
|
||||||
|
firmMapper.updateExamineStatus(firmInfo.getFirmId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,4 +5,17 @@
|
||||||
<mapper namespace="com.dragon.vehicle.company.server.mapper.FirmMapper">
|
<mapper namespace="com.dragon.vehicle.company.server.mapper.FirmMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<update id="updateActivateStatus">
|
||||||
|
update firm_info
|
||||||
|
<set>
|
||||||
|
<if test="firmName != null">
|
||||||
|
firm_examine_status = 1
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
|
||||||
|
where firm_id =#{firmId}
|
||||||
|
</update>
|
||||||
|
<update id="updateExamineStatus">
|
||||||
|
update firm_info set firm_examine_staus=1 where firm_id=#{firmId}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue