Commit 6c9ecd10 authored by shiyu's avatar shiyu

统计佣金

parent f0db73ec
...@@ -639,10 +639,10 @@ ...@@ -639,10 +639,10 @@
</select> </select>
<select id="countSelledNum" parameterType="java.lang.Long" resultType="java.lang.Long"> <select id="countSelledNum" parameterType="java.lang.Long" resultType="java.lang.Long">
select sum(item_num) as selledNum from distribution_order where item_id = #{itemId} and state not in (1, 101) select IFNULL(sum(item_num), 0) as selledNum from distribution_order where item_id = #{itemId} and state not in (1, 101)
</select> </select>
<select id="sumAmountByIntroducer" parameterType="java.lang.Long" resultType="java.lang.Long"> <select id="sumAmountByIntroducer" parameterType="java.lang.Long" resultType="java.lang.Long">
select sum(amount) as amount from distribution_order where share_record_id = #{introducerId} and seller_id =#{sellerId} and state not in (1, 101) select IFNULL(sum(amount), 0) as amount from distribution_order where share_record_id = #{introducerId} and seller_id =#{sellerId} and state not in (1, 101)
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -146,7 +146,6 @@ public class SelfPageServiceImpl implements SelfPageService { ...@@ -146,7 +146,6 @@ public class SelfPageServiceImpl implements SelfPageService {
@Override @Override
public Result getCollectorPageInfo(SelfPageRequestDto dto) { public Result getCollectorPageInfo(SelfPageRequestDto dto) {
try { try {
......
...@@ -56,6 +56,21 @@ public class SelfPageController { ...@@ -56,6 +56,21 @@ public class SelfPageController {
} }
@ApiOperation(value = "查询藏家个人主页信息")
@PostMapping("/getCollectorPageInfo")
public Result getCollectorPageInfo(@RequestBody SelfPageRequestDto dto) {
logger.info("查询藏家个人主页信息,请求参数:{}", JSON.toJSONString(dto));
Validator validator = new Validator(FormHandler.ofEntity(dto));
validator.set("userId", "用户id").must().number()
.end();
if (!validator.isValid()) {
return Result.failed(validator.getErrorInfo());
}
return selfPageService.getCollectorPageInfo(dto);
}
@ApiOperation(value = "分销商查询自己购买的订单信息") @ApiOperation(value = "分销商查询自己购买的订单信息")
@PostMapping("/getMyOrders") @PostMapping("/getMyOrders")
public Result getMyOrders(@RequestBody SelfPageRequestDto dto) { public Result getMyOrders(@RequestBody SelfPageRequestDto dto) {
......
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