推广部分小修改

This commit is contained in:
liuyingfang
2023-07-25 14:41:25 +08:00
parent ae628adba4
commit 817223d79f
9 changed files with 141 additions and 23 deletions

View File

@@ -65,12 +65,12 @@ public class MainPageController {
*/
@GetMapping("/userApp/teamControl")
public Result<Object> teamControl(String name,
@RequestParam(defaultValue = "1") Integer page,
@RequestParam(defaultValue = "1") Integer current,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam("typeCode") String typeCode){
UserApp result = userAppService.queryUserBaseInfoByToken();
Map<String, Object> merchantProfitVOS = merchantProfitService.teamList(typeCode, result.getUserId(),
page,size,name);
current,size,name);
return ResultGenerator.genSuccessResult(merchantProfitVOS);
}

View File

@@ -14,6 +14,8 @@ import cn.pluss.platform.merchantOrder.MerchantOrderService;
import cn.pluss.platform.merchantProfit.MerchantProfitService;
import cn.pluss.platform.userApp.UserAppService;
import cn.pluss.platform.util.StringUtil;
import cn.pluss.platform.vo.MerchantProfitVO;
import cn.pluss.platform.vo.ProfitOrderVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -124,7 +126,7 @@ public class MerchantProfitController {
map.put("endTime", sdf.parse(endTime));
}
}
//直属
List<MerchantProfit> merchantProfitList = merchantProfitService.queryMerchantProfitPage(map);
if (merchantProfitList != null && merchantProfitList.size() > 0) {
@@ -253,5 +255,17 @@ public class MerchantProfitController {
merchantProfit = merchantProfitService.queryMerchantProfit(merchantProfit);
return ResultGenerator.genSuccessResult(merchantProfit);
}
@GetMapping("/profitOrderList")
public Result<List<ProfitOrderVO>> ProfitOrderList(@RequestParam Integer type, @RequestParam Integer page,
@RequestParam Integer size){
UserApp userApp = userAppService.queryUserAppByToken();
Integer pageSize = size;
Integer offset = (page-1) * size;
if (type == 1) {
return ResultGenerator.genSuccessResult(merchantProfitMapper.directlyOrder(userApp.getUserId(), pageSize, offset));
}
return ResultGenerator.genSuccessResult(merchantProfitMapper.teamOrder(userApp.getUserId(), pageSize, offset));
}
}