Commit d39c2a5c by manxiaoqiang

app排序

parent a795255d
......@@ -225,8 +225,8 @@ public class ContractController {
@RequestMapping(value = "find/payall", method = RequestMethod.GET)
@ResponseBody
public ResultModel findPayAll(@CurrentAccount User loginAccount, @RequestParam String startDate,
@RequestParam String endDate) {
return ResultModel.OK(service.findPay(startDate, endDate));
@RequestParam String endDate, @PathVariable String platform) {
return ResultModel.OK(service.findPayAll(startDate, endDate, platform));
}
......
......@@ -15,8 +15,8 @@ public interface ContractMoneyRepository extends JpaRepository<ContractMoney, Lo
@Query(value="select * from contract_money where ds >= ?1 and ds <= ?2 and contract_code = ?3 order by ds desc",nativeQuery=true)
List<ContractMoney> findByDs(String startDate, String endDate, String code);
@Query(value="select * from contract_money where ds >= ?1 and ds <= ?2 order by ds desc",nativeQuery=true)
List<ContractMoney> findByDs(String startDate, String endDate);
@Query(value="select * from contract_money where ds >= ?1 and ds <= ?2 and platform = ?3 order by ds desc",nativeQuery=true)
List<ContractMoney> findByDsAll(String startDate, String endDate, String platform);
@Query(value="select * from contract_money where ds >= ?1 and ds <= ?2 and email = ?3 and platform = ?4 order by ds desc",nativeQuery=true)
List<ContractMoney> findByDs(String startDate, String endDate, String email, String platform);
......
......@@ -41,5 +41,5 @@ public interface ContractService {
Contract updatePay(User loginUser, ContractMoney resource);
List<ContractMoney> findPay(String startDate, String endDate);
List<ContractMoney> findPayAll(String startDate, String endDate, String platform);
}
......@@ -371,7 +371,7 @@ public class ContractServiceImpl implements ContractService{
}
@Override
public List<ContractMoney> findPay(String startDate, String endDate) {
public List<ContractMoney> findPayAll(String startDate, String endDate, String platfrom) {
List<User> sales = userRepository.findAll();
Map<Long, String> saleMap = new HashMap<>();
if(ValidateUtil.isValid(sales)){
......@@ -381,7 +381,7 @@ public class ContractServiceImpl implements ContractService{
}
List<ContractMoney> result = new ArrayList<>();
List<ContractMoney> list = contractMoneyRepository.findByDs(startDate, endDate);
List<ContractMoney> list = contractMoneyRepository.findByDsAll(startDate, endDate, platfrom);
if(ValidateUtil.isValid(list)){
for(ContractMoney cm : list){
cm.setCreateName(saleMap.containsKey(cm.getUser()) ? saleMap.get(cm.getUser()) : "");
......
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