企业入驻
parent
1066becf7d
commit
ec5ac5ac80
|
@ -7,10 +7,9 @@ import com.dragon.vehicle.company.common.utils.BaiDuAiCheck;
|
|||
import com.dragon.vehicle.company.server.service.FirmService;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/firm")
|
||||
|
@ -20,6 +19,11 @@ public class FirmController {
|
|||
private FirmService firmService;
|
||||
|
||||
|
||||
/**
|
||||
* 企业认证
|
||||
* @param firmInfo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/firmEnter")
|
||||
public Object addFirm(@RequestBody FirmInfo firmInfo){
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
@ -39,4 +43,26 @@ public class FirmController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查看数据
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/firmList")
|
||||
public Result<List<FirmInfo>> selectFirmList(){
|
||||
List<FirmInfo> list=firmService.selectFirmList();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 逻辑删除
|
||||
* @param firmId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/logicDeleteFirmList/{firmId}")
|
||||
public Result logicDeleteFirmList(@PathVariable Integer firmId){
|
||||
Result result=firmService.logicDeleteFirmList(firmId);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,9 +2,15 @@ package com.dragon.vehicle.company.server.mapper;
|
|||
|
||||
import com.dragon.vehicle.company.common.domain.FirmInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface FirmMapper {
|
||||
void addFirm(FirmInfo firmInfo);
|
||||
|
||||
List<FirmInfo> selectFirmList();
|
||||
|
||||
void logicDeleteFirmList(@Param("firmId") Integer firmId);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ import com.dragon.vehicle.company.server.service.FirmService;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class FirmServiceImpl implements FirmService {
|
||||
|
||||
|
@ -36,4 +38,15 @@ public class FirmServiceImpl implements FirmService {
|
|||
return Result.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FirmInfo> selectFirmList() {
|
||||
return firmMapper.selectFirmList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result logicDeleteFirmList(Integer firmId) {
|
||||
firmMapper.logicDeleteFirmList(firmId);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,4 +11,13 @@
|
|||
values (#{firmName},#{firmTel},#{firmAddress},#{firmRepresentative},#{firmRepresentativePhone},#{firmRepresentativeId},#{firmBank},
|
||||
#{firmBankAccount},#{firmBusinessLicense},#{unifiedSocialCredit})
|
||||
</insert>
|
||||
|
||||
<update id="logicDeleteFirmList">
|
||||
update firm_info set del_status where firm_id=#{firmId}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectFirmList" resultType="com.dragon.vehicle.company.common.domain.FirmInfo">
|
||||
select *from firm_info
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue