Commit 6778b148 by kangxiaoshan

v1.3

parent f8b78a2f
...@@ -75,6 +75,15 @@ public class ContractController { ...@@ -75,6 +75,15 @@ public class ContractController {
return ResultModel.OK(service.findAll(loginAccount,startDate, endDate, platform,contractId)); return ResultModel.OK(service.findAll(loginAccount,startDate, endDate, platform,contractId));
} }
@RequestMapping(value = "findOne", method = RequestMethod.GET)
@ResponseBody
public ResultModel findOne(@CurrentAccount User loginAccount, @PathVariable String platform,
@RequestParam String startDate, @RequestParam String endDate,String contractId) {
return ResultModel.OK(service.findOne(loginAccount,startDate, endDate, platform,contractId));
}
@RequestMapping(value = "export", method = RequestMethod.GET,produces = MediaType.APPLICATION_OCTET_STREAM_VALUE) @RequestMapping(value = "export", method = RequestMethod.GET,produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
@ResponseBody @ResponseBody
public ResponseEntity<byte[]> export(@CurrentAccount User loginAccount, @PathVariable String platform, @RequestParam String startDate public ResponseEntity<byte[]> export(@CurrentAccount User loginAccount, @PathVariable String platform, @RequestParam String startDate
......
...@@ -79,4 +79,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> { ...@@ -79,4 +79,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value="SELECT * from contract where platform =?1 and email = ?2 and (status <> 'end' or status <> 'cancel')",nativeQuery=true) @Query(value="SELECT * from contract where platform =?1 and email = ?2 and (status <> 'end' or status <> 'cancel')",nativeQuery=true)
List<Contract> findByPlatformAndEmailStatus(String platgorm, String email, int status); List<Contract> findByPlatformAndEmailStatus(String platgorm, String email, int status);
@Query(value = "select * from contract where contract_code =?2 and platform = ?1 ",nativeQuery = true)
Contract findOneByCode(String platform, String contractId);
} }
...@@ -70,4 +70,6 @@ public interface ContractService { ...@@ -70,4 +70,6 @@ public interface ContractService {
List<ChangeDelDetail> getChangeDelDetailData(User loginAccount, String pid); List<ChangeDelDetail> getChangeDelDetailData(User loginAccount, String pid);
ChangeDelInfo changesDelRecover(String id, String type, User loginAccount); ChangeDelInfo changesDelRecover(String id, String type, User loginAccount);
Contract findOne(User loginAccount, String startDate, String endDate, String platform, String contractId);
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment