推广部分最后修改
This commit is contained in:
@@ -58,7 +58,7 @@ public class MainPageController {
|
||||
/**
|
||||
* 团队管理
|
||||
* @param name
|
||||
* @param page
|
||||
* @param current
|
||||
* @param size
|
||||
* @param typeCode
|
||||
* @return
|
||||
|
||||
@@ -258,14 +258,14 @@ public class MerchantProfitController {
|
||||
|
||||
@GetMapping("/profitOrderList")
|
||||
public Result<List<ProfitOrderVO>> ProfitOrderList(@RequestParam Integer type, @RequestParam Integer page,
|
||||
@RequestParam Integer size){
|
||||
@RequestParam Integer size, String startTime, String endTime){
|
||||
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.directlyOrder(userApp.getUserId(), pageSize, offset, startTime, endTime));
|
||||
}
|
||||
return ResultGenerator.genSuccessResult(merchantProfitMapper.teamOrder(userApp.getUserId(), pageSize, offset));
|
||||
return ResultGenerator.genSuccessResult(merchantProfitMapper.teamOrder(userApp.getUserId(), pageSize, offset, startTime, endTime));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.pluss.platform.dto.MerchantFeeDTO;
|
||||
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||
import cn.pluss.platform.entity.MerchantProfit;
|
||||
import cn.pluss.platform.vo.DeviceGoodsVO;
|
||||
import cn.pluss.platform.vo.MerChannelStatusVO;
|
||||
import cn.pluss.platform.vo.MerchantProfitVO;
|
||||
import cn.pluss.platform.vo.ProfitOrderVO;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
@@ -32,6 +33,7 @@ public interface MerchantProfitMapper extends BaseMapper<MerchantProfit> {
|
||||
List<MerchantProfit> queryMerchantProfitPage(Map map);
|
||||
|
||||
Integer queryMerchantProfitPageCount(Map map);
|
||||
Integer queryMerchantProfitPageCountV2(@Param("userId") String userId);
|
||||
|
||||
void saveMerchantProfitBatch(List<MerchantProfit> merchantProfitList);
|
||||
|
||||
@@ -118,7 +120,12 @@ public interface MerchantProfitMapper extends BaseMapper<MerchantProfit> {
|
||||
BigDecimal getConsumeFeeTeamToday(@Param("userId") String userId);
|
||||
|
||||
List<MerchantProfitVO> getTeamList(@Param("typeCode") String typeCode, @Param("userId") Long userId,
|
||||
@Param("userName") String userName);
|
||||
@Param("userName") String userName, @Param("pageSize") Integer pageSize,
|
||||
@Param("offset") Integer offset);
|
||||
List<MerchantProfitVO> getMerchantTeamList(@Param("typeCode") String typeCode, @Param("userId") Long userId,
|
||||
@Param("userName") String userName, @Param("pageSize") Integer pageSize,
|
||||
@Param("offset") Integer offset);
|
||||
|
||||
|
||||
@Select("SELECT\n" +
|
||||
"\tcount(*) \n" +
|
||||
@@ -128,8 +135,9 @@ public interface MerchantProfitMapper extends BaseMapper<MerchantProfit> {
|
||||
"\tparent_user_id = #{userId}\n" +
|
||||
"\tAND type_code = #{typeCode}")
|
||||
Integer getCountChild( @Param("userId") Long userId,@Param("typeCode") String typeCod);
|
||||
Integer getCountChildV2( @Param("userId") Long userId);
|
||||
|
||||
List<MerchantChannelStatus> getChannelStatus(@Param("merchantCode") String merchantCode);
|
||||
List<MerChannelStatusVO> getChannelStatus(@Param("merchantCode") String merchantCode);
|
||||
|
||||
/**
|
||||
* 直属交易
|
||||
@@ -138,10 +146,12 @@ public interface MerchantProfitMapper extends BaseMapper<MerchantProfit> {
|
||||
* @param offset
|
||||
* @return
|
||||
*/
|
||||
List<ProfitOrderVO> directlyOrder(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset);
|
||||
List<ProfitOrderVO> directlyOrder(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset,
|
||||
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
/**
|
||||
* 团队交易
|
||||
*/
|
||||
List<ProfitOrderVO> teamOrder(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset);
|
||||
List<ProfitOrderVO> teamOrder(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset,
|
||||
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||
}
|
||||
|
||||
|
||||
@@ -880,7 +880,8 @@
|
||||
LEFT JOIN tb_pluss_merchant_base_info b ON b.userId = p.user_id
|
||||
LEFT JOIN tb_pluss_merchant_order v ON v.merchantCode = b.merchantCode
|
||||
WHERE
|
||||
FIND_IN_SET( p.user_id, ID._ids )
|
||||
b.userId != #{userId}
|
||||
AND FIND_IN_SET( p.user_id, ID._ids )
|
||||
AND v.status = 1
|
||||
</select>
|
||||
<select id="getConsumeFeeTeamToday" resultType="java.math.BigDecimal">
|
||||
@@ -925,14 +926,65 @@
|
||||
AND ua.userName = #{userName}
|
||||
</if>
|
||||
order by ua.userId DESC
|
||||
LIMIT #{pageSize} OFFSET #{offset}
|
||||
</select>
|
||||
<select id="getChannelStatus" resultType="cn.pluss.platform.entity.MerchantChannelStatus">
|
||||
|
||||
<select id="getMerchantTeamList" resultType="cn.pluss.platform.vo.MerchantProfitVO">
|
||||
SELECT
|
||||
p.user_id AS id,
|
||||
u.loginName AS phone,
|
||||
ua.userName,
|
||||
pr.createTime AS createDt,
|
||||
p.parent_user_id,
|
||||
pr.trueName AS parentTrueName,
|
||||
p.type_code,
|
||||
IFNULL( k.sumConsumeFee, 0 ) AS consumeFee,
|
||||
IFNULL( k.yestedayConsumeFee, 0 ) AS yestedayConsumeFee,
|
||||
IFNULL(n.num,0) as countNum,
|
||||
k.merchantCode
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@ids AS _ids,
|
||||
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||
@l := @l + 1 AS LEVEL
|
||||
FROM
|
||||
tb_pluss_user_promotion,
|
||||
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||
WHERE @ids IS NOT NULL ) ID,
|
||||
tb_pluss_user_promotion p
|
||||
LEFT JOIN tb_pluss_user_info u ON p.user_id = u.id
|
||||
LEFT JOIN tb_pluss_user_info pr ON p.parent_user_id = pr.id
|
||||
left join view_order_user_num n on p.user_id=n.userId
|
||||
LEFT JOIN tb_pluss_user_app ua ON n.userId = ua.userId
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
i.userId,
|
||||
i.merchantCode,
|
||||
IFNULL( sum( i.sumConsumeFee ), 0 ) AS sumConsumeFee,
|
||||
IFNULL( sum( i.yestedayConsumeFee ), 0 ) AS yestedayConsumeFee
|
||||
FROM
|
||||
view_order_info i
|
||||
GROUP BY
|
||||
i.userId
|
||||
) k ON p.user_id = k.userId
|
||||
WHERE
|
||||
FIND_IN_SET( p.user_id, ID._ids )
|
||||
AND p.user_id != #{userId}
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.trueName = #{userName}
|
||||
</if>
|
||||
ORDER BY
|
||||
user_id
|
||||
LIMIT #{pageSize} OFFSET #{offset}
|
||||
</select>
|
||||
<select id="getChannelStatus" resultType="cn.pluss.platform.vo.MerChannelStatusVO">
|
||||
SELECT
|
||||
`status`, authorizationStatus,remark,virChannelFlag
|
||||
FROM
|
||||
tb_pluss_merchant_channel_status
|
||||
WHERE merchantCode = #{merchantCode}
|
||||
|
||||
AND virChannelFlag != 1
|
||||
</select>
|
||||
<select id="directlyOrder" resultType="cn.pluss.platform.vo.ProfitOrderVO">
|
||||
SELECT
|
||||
@@ -943,6 +995,12 @@
|
||||
FROM
|
||||
view_base_order v
|
||||
WHERE v.userId in (select p.user_id from tb_pluss_user_promotion p where p.parent_user_id= #{userId})
|
||||
<if test="startTime != null">
|
||||
AND v.createDt >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND v.createDt <= #{endTime}
|
||||
</if>
|
||||
order by v.id desc
|
||||
limit #{pageSize} offset #{offset}
|
||||
</select>
|
||||
@@ -978,8 +1036,80 @@
|
||||
user_id
|
||||
)
|
||||
and v.userId!=#{userId}
|
||||
<if test="startTime != null">
|
||||
AND v.createDt >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND v.createDt <= #{endTime}
|
||||
</if>
|
||||
ORDER BY
|
||||
v.id desc
|
||||
limit #{pageSize} offset #{offset}
|
||||
</select>
|
||||
<select id="queryMerchantProfitPageCountV2" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(v.userId)
|
||||
FROM
|
||||
view_base_order v
|
||||
WHERE
|
||||
v.userId IN (
|
||||
SELECT
|
||||
p.user_id
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@ids AS _ids,
|
||||
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||
@l := @l + 1 AS LEVEL
|
||||
FROM
|
||||
tb_pluss_user_promotion,
|
||||
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||
WHERE
|
||||
@ids IS NOT NULL
|
||||
) ID,
|
||||
tb_pluss_user_promotion p
|
||||
WHERE
|
||||
FIND_IN_SET( p.user_id, ID._ids )
|
||||
ORDER BY
|
||||
user_id
|
||||
)
|
||||
AND v.userId != #{userId}
|
||||
ORDER BY
|
||||
v.id DESC
|
||||
</select>
|
||||
<select id="getCountChildV2" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(p.user_id)
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@ids AS _ids,
|
||||
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||
@l := @l + 1 AS LEVEL
|
||||
FROM
|
||||
tb_pluss_user_promotion,
|
||||
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||
WHERE @ids IS NOT NULL ) ID,
|
||||
tb_pluss_user_promotion p
|
||||
LEFT JOIN tb_pluss_user_info u ON p.user_id = u.id
|
||||
LEFT JOIN tb_pluss_user_info pr ON p.parent_user_id = pr.id
|
||||
LEFT JOIN view_order_user_num n ON p.user_id = n.userId
|
||||
LEFT JOIN tb_pluss_user_app ua ON n.userId = ua.userId
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
i.userId,
|
||||
i.merchantCode,
|
||||
IFNULL( sum( i.sumConsumeFee ), 0 ) AS sumConsumeFee,
|
||||
IFNULL( sum( i.yestedayConsumeFee ), 0 ) AS yestedayConsumeFee
|
||||
FROM
|
||||
view_order_info i
|
||||
GROUP BY
|
||||
i.userId
|
||||
) k ON p.user_id = k.userId
|
||||
WHERE
|
||||
FIND_IN_SET( p.user_id, ID._ids )
|
||||
AND p.user_id != #{userId}
|
||||
ORDER BY
|
||||
user_id
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -1674,6 +1674,7 @@
|
||||
LEFT JOIN tb_pluss_user_promotion up ON ua.userId = up.parent_user_id
|
||||
WHERE
|
||||
up.parent_user_id = #{userId}
|
||||
AND up.type_code = 'MC'
|
||||
AND up.create_time <![CDATA[ >= ]]> #{startTime}
|
||||
AND up.create_time <![CDATA[ <= ]]> #{endTime}
|
||||
</select>
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
||||
|
||||
/**
|
||||
* 引导页
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
||||
@@ -64,7 +64,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
||||
@RequestMapping(value = "/queryActivityActivateByPage", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Map<String, Object> queryActivityActivateByPage(@RequestParam(defaultValue = "1") Integer currPage,
|
||||
String name) {
|
||||
String name) {
|
||||
Map<String, Object> map = new HashMap<>(16);
|
||||
Map<String, Object> result = new HashMap<>(16);
|
||||
Boolean bol = verifyUserRole();
|
||||
@@ -182,7 +182,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
||||
|
||||
/**
|
||||
* 保存对象
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@RequestMapping(value = "/saveActivityActivate", method = RequestMethod.POST)
|
||||
@@ -238,7 +238,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
||||
|
||||
/**
|
||||
* 修改对象
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@RequestMapping(value = "/updateActivityActivate", method = RequestMethod.POST)
|
||||
@@ -256,7 +256,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
||||
|
||||
/**
|
||||
* 删除对象
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@RequestMapping(value = "/deleteActivityActivate", method = RequestMethod.POST)
|
||||
@@ -298,5 +298,4 @@ public class ActivityActivateController extends BaseNoModelController {
|
||||
List<MerchantBaseInfo> merchantBaseInfoList = merchantBaseInfoService.queryMerchantBaseInfoList(null);
|
||||
request.setAttribute("merchantBaseInfoList", merchantBaseInfoList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package cn.pluss.platform.vo;
|
||||
|
||||
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -25,6 +28,10 @@ public class MerchantProfitVO {
|
||||
* userId
|
||||
*/
|
||||
private String userId;
|
||||
/**
|
||||
* parent_user_id
|
||||
*/
|
||||
private Integer parent_user_id;
|
||||
/**
|
||||
*总交易金额
|
||||
*/
|
||||
@@ -49,12 +56,14 @@ public class MerchantProfitVO {
|
||||
/**
|
||||
* 入网时间
|
||||
*/
|
||||
private String createDt;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createDt;
|
||||
|
||||
private List<MerChannelStatusVO> channelStatus;
|
||||
private String statusD1 = "0";
|
||||
private String statusD0 = "0";
|
||||
private String authorizationStatus = "0";
|
||||
private String remarkD1;
|
||||
private String remarkD0;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package cn.pluss.platform.vo;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 直推间推商户收款
|
||||
@@ -14,7 +17,9 @@ public class ProfitOrderVO {
|
||||
private String merchantName;
|
||||
|
||||
private BigDecimal consumeFee;
|
||||
private String transDt;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date transDt;
|
||||
|
||||
private String orderNumber;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
||||
//今日收款笔数
|
||||
queryMap.put("recordDate", DateUtils.getDayBegin());
|
||||
queryMap.put("retype", "1");
|
||||
totalOrderCount = merchantProfitService.queryMerchantProfitPageCount(queryMap);
|
||||
totalOrderCount = merchantProfitMapper.queryMerchantProfitPageCountV2(userId);
|
||||
todayProfit = merchantProfitService.queryMerchantProfitSumPrice(queryMap);
|
||||
//今日收益
|
||||
BigDecimal todaySum = merchantProfitMapper.getTodaySum(userId);
|
||||
@@ -102,7 +102,7 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
||||
//今日收款
|
||||
BigDecimal consumeFeeTeamToday = merchantProfitMapper.getConsumeFeeTeamToday(userId);
|
||||
//总商户数
|
||||
Integer countChildAll = merchantProfitMapper.getCountChild(Long.valueOf(userId), "MC");
|
||||
Integer countChildAll = merchantProfitMapper.getCountChildV2(Long.valueOf(userId));
|
||||
|
||||
resultMap.put("promoteFee", promoteFee + "");
|
||||
resultMap.put("totalOrderCount", totalOrderCount + "");
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package cn.pluss.platform.merchantProfit.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.pluss.platform.api.PageInfo;
|
||||
import cn.pluss.platform.constants.Constant;
|
||||
import cn.pluss.platform.entity.*;
|
||||
import cn.pluss.platform.enums.BstLevelCode;
|
||||
import cn.pluss.platform.enums.UserRoleEnum;
|
||||
import cn.pluss.platform.exception.MsgException;
|
||||
import cn.pluss.platform.mapper.*;
|
||||
import cn.pluss.platform.merchant.MerchantRateNewService;
|
||||
import cn.pluss.platform.mapper.MerchantOrderMapper;
|
||||
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
||||
import cn.pluss.platform.mapper.UserAppMapper;
|
||||
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||
import cn.pluss.platform.notice.NoticeService;
|
||||
import cn.pluss.platform.user.UserLevelService;
|
||||
@@ -16,14 +17,11 @@ import cn.pluss.platform.user.impl.GeneralPushUtil;
|
||||
import cn.pluss.platform.userAssess.UserAssessService;
|
||||
import cn.pluss.platform.userRewardFlow.UserRewardFlowService;
|
||||
import cn.pluss.platform.util.DateUtils;
|
||||
import cn.pluss.platform.util.StringUtil;
|
||||
import cn.pluss.platform.vo.MerChannelStatusVO;
|
||||
import cn.pluss.platform.vo.MerchantProfitVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.dao.DuplicateKeyException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -31,7 +29,6 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@Service
|
||||
@@ -110,7 +107,6 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
@Override
|
||||
public Map<String, Object> teamList(String typeCode, Long userId,Integer page,Integer size,
|
||||
String name) {
|
||||
page = page-1;
|
||||
switch (typeCode){
|
||||
case "AG":
|
||||
typeCode = "FB";
|
||||
@@ -127,53 +123,104 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
||||
throw new MsgException("身份错误");
|
||||
}
|
||||
|
||||
// PageInfo<MerchantProfitVO> teamList= merchantProfitMapper.getTeamList(typeCode, userId, page,size,name);
|
||||
// PageInfo<MerchantProfitVO> teamList= merchantProfitMapper.getTeamList(typeCode, userId, page,size,name);
|
||||
|
||||
Integer countChild = merchantProfitMapper.getCountChild(userId, typeCode);
|
||||
Integer pagerSize = size;
|
||||
Integer offset = (page - 1) * size;
|
||||
//商户列表
|
||||
if ("MC".equals(typeCode)) {
|
||||
List<MerchantProfitVO> teamList = merchantProfitMapper.getTeamList(typeCode, userId,name);
|
||||
List<MerchantProfitVO> teamList = merchantProfitMapper.getMerchantTeamList(typeCode, userId, name, pagerSize, offset);
|
||||
for (MerchantProfitVO values : teamList) {
|
||||
List<MerChannelStatusVO> list = new ArrayList<>();
|
||||
if (values.getMerchantCode() != null) {
|
||||
String merchantCode = values.getMerchantCode();
|
||||
List<MerchantChannelStatus> channelStatus = merchantProfitMapper.getChannelStatus(merchantCode);
|
||||
if (channelStatus != null) {
|
||||
for (MerchantChannelStatus valuesStatus : channelStatus) {
|
||||
if ("D1".equals(valuesStatus.getVirChannelFlag())) {
|
||||
values.setStatusD1(valuesStatus.getStatus());
|
||||
values.setRemarkD1(valuesStatus.getStatus());
|
||||
values.setAuthorizationStatus(valuesStatus.getAuthorizationStatus());
|
||||
}
|
||||
if ("D0".equals(valuesStatus.getVirChannelFlag())) {
|
||||
values.setStatusD0(valuesStatus.getStatus());
|
||||
values.setRemarkD0(valuesStatus.getStatus());
|
||||
}
|
||||
}
|
||||
}
|
||||
Integer countUser = mapperOrderMapper.getCountUser(Long.valueOf(values.getUserId()));
|
||||
if (countUser > 0) {
|
||||
values.setCountNum(countUser);
|
||||
values.setConsumeFee(mapperOrderMapper.getAmountData(values.getMerchantCode()));
|
||||
values.setYestedayConsumeFee(mapperOrderMapper.getPlatformAmtYestday(values.getMerchantCode(),
|
||||
DateUtils.getBeginDayOfYesterday(), DateUtils.getEndDayOfYesterDay()));
|
||||
}
|
||||
MerChannelStatusVO V0 = new MerChannelStatusVO();
|
||||
V0.setStatus("1");
|
||||
V0.setVirChannelFlag("D1");
|
||||
V0.setAuthorizationStatus("0");
|
||||
V0.setRemark("");
|
||||
list.add(V0);
|
||||
MerChannelStatusVO V1 = new MerChannelStatusVO();
|
||||
V1.setStatus("1");
|
||||
V1.setVirChannelFlag("D0");
|
||||
V1.setAuthorizationStatus("0");
|
||||
V1.setRemark("");
|
||||
list.add(V1);
|
||||
values.setChannelStatus(list);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
String merchantCode = values.getMerchantCode();
|
||||
List<MerChannelStatusVO> channelStatus = merchantProfitMapper.getChannelStatus(merchantCode);
|
||||
//没有
|
||||
if (ObjectUtil.isEmpty(channelStatus) || channelStatus.size() <= 0) {
|
||||
MerChannelStatusVO V0 = new MerChannelStatusVO();
|
||||
V0.setStatus("1");
|
||||
V0.setVirChannelFlag("D1");
|
||||
V0.setAuthorizationStatus("0");
|
||||
V0.setRemark("");
|
||||
list.add(V0);
|
||||
MerChannelStatusVO V1 = new MerChannelStatusVO();
|
||||
V1.setStatus("1");
|
||||
V1.setVirChannelFlag("D0");
|
||||
V1.setAuthorizationStatus("0");
|
||||
V1.setRemark("");
|
||||
list.add(V1);
|
||||
values.setChannelStatus(list);
|
||||
continue;
|
||||
}
|
||||
//一个
|
||||
if (channelStatus.size() == 1) {
|
||||
MerChannelStatusVO channelStatus1 = channelStatus.get(0);
|
||||
switch (channelStatus1.getVirChannelFlag()) {
|
||||
case "D0":
|
||||
list.add(channelStatus1);
|
||||
MerChannelStatusVO V1 = new MerChannelStatusVO();
|
||||
V1.setStatus("1");
|
||||
V1.setVirChannelFlag("D1");
|
||||
V1.setAuthorizationStatus("0");
|
||||
V1.setRemark("");
|
||||
list.add(V1);
|
||||
values.setChannelStatus(list);
|
||||
break;
|
||||
case "D1":
|
||||
list.add(channelStatus1);
|
||||
MerChannelStatusVO V0 = new MerChannelStatusVO();
|
||||
V0.setStatus("1");
|
||||
V0.setVirChannelFlag("D0");
|
||||
V0.setAuthorizationStatus("0");
|
||||
V0.setRemark("");
|
||||
list.add(V0);
|
||||
values.setChannelStatus(list);
|
||||
break;
|
||||
|
||||
teamList = teamList.stream().skip(page * size).limit(size).collect(Collectors.toList());
|
||||
}
|
||||
continue;
|
||||
}
|
||||
//两个
|
||||
if (channelStatus.size() == 2) {
|
||||
values.setChannelStatus(channelStatus);
|
||||
continue;
|
||||
}
|
||||
// Integer countUser = mapperOrderMapper.getCountUser(Long.valueOf(values.getUserId()));
|
||||
// if (countUser > 0) {
|
||||
// values.setCountNum(countUser);
|
||||
// values.setConsumeFee(mapperOrderMapper.getAmountData(values.getMerchantCode()));
|
||||
// values.setYestedayConsumeFee(mapperOrderMapper.getPlatformAmtYestday(values.getMerchantCode(),
|
||||
// DateUtils.getBeginDayOfYesterday(), DateUtils.getEndDayOfYesterDay()));
|
||||
// }
|
||||
}
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("total", countChild);
|
||||
hashMap.put("teamList", teamList);
|
||||
return hashMap;
|
||||
}
|
||||
//团队管理
|
||||
List<MerchantProfitVO> teamList = merchantProfitMapper.getTeamList(typeCode, userId,name);
|
||||
List<MerchantProfitVO> teamList = merchantProfitMapper.getTeamList(typeCode, userId, name, pagerSize, offset);
|
||||
for (MerchantProfitVO values : teamList) {
|
||||
values.setCurrentMonth(mapperOrderMapper.getPlatformAmtYestday(values.getMerchantCode(),
|
||||
DateUtils.getBeginDayOfMonth(), DateUtils.getEndDayOfMonth()));
|
||||
values.setConsumeFee(mapperOrderMapper.getAmountData(values.getMerchantCode()));
|
||||
}
|
||||
teamList = teamList.stream().skip(page * size).limit(size).collect(Collectors.toList());
|
||||
HashMap<String, Object> hashMap = new HashMap<>();
|
||||
hashMap.put("total", countChild);
|
||||
hashMap.put("teamList", teamList);
|
||||
|
||||
Reference in New Issue
Block a user