|
|
|
@ -3,6 +3,7 @@ package com.example.demo.controller.cash; |
|
|
|
import com.example.demo.Util.JWTUtil; |
|
|
|
import com.example.demo.domain.entity.Admin; |
|
|
|
import com.example.demo.domain.entity.CashRecord; |
|
|
|
import com.example.demo.domain.entity.User; |
|
|
|
import com.example.demo.domain.vo.cash.CashCollection; |
|
|
|
import com.example.demo.domain.vo.coin.Page; |
|
|
|
import com.example.demo.domain.vo.coin.Result; |
|
|
|
@ -36,11 +37,25 @@ public class CashCollectionController { |
|
|
|
@Autowired |
|
|
|
private CashCollectionService cashCollectionService; |
|
|
|
|
|
|
|
//根据精网号获取姓名和地区 |
|
|
|
@PostMapping("/getNameAndMarket") |
|
|
|
public User getNameAndMarket(@RequestBody Integer jwcode) { |
|
|
|
return cashCollectionService.getNameAndMarket(jwcode); |
|
|
|
|
|
|
|
} |
|
|
|
//获取收款活动列表 |
|
|
|
@PostMapping("/getActivityList") |
|
|
|
public Result getActivityList() |
|
|
|
{ |
|
|
|
List<String> list = cashCollectionService.getActivityList(); |
|
|
|
return Result.success(list); |
|
|
|
} |
|
|
|
//新增收款订单 |
|
|
|
@PostMapping("/add") |
|
|
|
public Result add(@RequestBody CashCollection cashCollection) { |
|
|
|
try { |
|
|
|
return cashCollectionService.add(cashCollection); |
|
|
|
|
|
|
|
return Result.success(cashCollectionService.add(cashCollection)); |
|
|
|
} catch (Exception e) { |
|
|
|
return Result.error(e.getMessage()); |
|
|
|
} |
|
|
|
@ -49,7 +64,8 @@ public class CashCollectionController { |
|
|
|
@PostMapping("/cancel") |
|
|
|
public Result cancel(@RequestBody CashRecord cashRecord) { |
|
|
|
try { |
|
|
|
return cashCollectionService.cancel(cashRecord.getOrderCode()); |
|
|
|
|
|
|
|
return Result.success( cashCollectionService.cancel(cashRecord.getOrderCode())); |
|
|
|
}catch (Exception e){ |
|
|
|
return Result.error(e.getMessage()); |
|
|
|
} |
|
|
|
|