Authored by mingdan.ge

cps用户管理

@@ -93,6 +93,7 @@ @@ -93,6 +93,7 @@
93 <value>/UnionShareRest/checkBankCard</value> 93 <value>/UnionShareRest/checkBankCard</value>
94 <value>/UnionShareRest/queryUnionShareUserBanks</value> 94 <value>/UnionShareRest/queryUnionShareUserBanks</value>
95 <value>/UnionShareRest/queryUnionShareUserApplys</value> 95 <value>/UnionShareRest/queryUnionShareUserApplys</value>
  96 + <value>/UnionShareRest/queryUnionShareUsers</value>
96 <value>/UnionShareRest/getSocialMediaBasicParams</value> 97 <value>/UnionShareRest/getSocialMediaBasicParams</value>
97 <value>/UnionShareRest/cancelUserBanks</value> 98 <value>/UnionShareRest/cancelUserBanks</value>
98 <value>/UnionShareRest/updateBankBranch</value> 99 <value>/UnionShareRest/updateBankBranch</value>
1 package com.yoho.unions.dal; 1 package com.yoho.unions.dal;
2 2
  3 +import com.yoho.service.model.union.request.UnionShareUserReqBO;
  4 +import com.yoho.service.model.union.response.UnionShareUserRspBo;
3 import com.yoho.unions.dal.model.UnionShareUser; 5 import com.yoho.unions.dal.model.UnionShareUser;
4 import org.apache.ibatis.annotations.MapKey; 6 import org.apache.ibatis.annotations.MapKey;
5 import org.apache.ibatis.annotations.Param; 7 import org.apache.ibatis.annotations.Param;
6 8
  9 +import java.util.List;
7 import java.util.Map; 10 import java.util.Map;
8 import java.util.Set; 11 import java.util.Set;
9 12
@@ -20,6 +23,9 @@ public interface UnionShareUserMapper { @@ -20,6 +23,9 @@ public interface UnionShareUserMapper {
20 23
21 int selectCountByUid(Integer uid); 24 int selectCountByUid(Integer uid);
22 25
  26 + int selectTotalByCondition(UnionShareUserReqBO reqBO);
  27 + List<UnionShareUserRspBo> selectByCondition(UnionShareUserReqBO reqBO);
  28 +
23 int updateByPrimaryKeySelective(UnionShareUser record); 29 int updateByPrimaryKeySelective(UnionShareUser record);
24 30
25 int updateByUid(UnionShareUser record); 31 int updateByUid(UnionShareUser record);
@@ -31,6 +31,35 @@ @@ -31,6 +31,35 @@
31 select count(1) from union_share_user 31 select count(1) from union_share_user
32 where uid = #{uid,jdbcType=INTEGER} 32 where uid = #{uid,jdbcType=INTEGER}
33 </select> 33 </select>
  34 + <select id="selectTotalByCondition" resultType="java.lang.Integer" parameterType="com.yoho.service.model.union.request.UnionShareUserReqBO" >
  35 + select count(1) from union_share_user
  36 + where status=1
  37 + <if test="uid!=null" >
  38 + and uid = #{uid,jdbcType=INTEGER}
  39 + </if>
  40 + <if test="unionType!=null" >
  41 + and union_type = #{unionType,jdbcType=VARCHAR}
  42 + </if>
  43 + <if test="specialStatus!=null" >
  44 + and special_status = #{specialStatus,jdbcType=INTEGER}
  45 + </if>
  46 + </select>
  47 + <select id="selectByCondition" resultType="com.yoho.service.model.union.response.UnionShareUserRspBo" parameterType="com.yoho.service.model.union.request.UnionShareUserReqBO" >
  48 + select id, uid, union_type unionType, update_time updateTime,create_time createTime,status,apply_id applyId,special_status specialStatus,cps_activity_id cpsActivityId
  49 + from union_share_user
  50 + where status=1
  51 + <if test="uid!=null" >
  52 + and uid = #{uid,jdbcType=INTEGER}
  53 + </if>
  54 + <if test="unionType!=null" >
  55 + and union_type = #{unionType,jdbcType=VARCHAR}
  56 + </if>
  57 + <if test="specialStatus!=null" >
  58 + and special_status = #{specialStatus,jdbcType=INTEGER}
  59 + </if>
  60 + order by create_time desc
  61 + limit #{start},#{size}
  62 + </select>
34 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > 63 <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
35 delete from union_share_user 64 delete from union_share_user
36 where id = #{id,jdbcType=INTEGER} 65 where id = #{id,jdbcType=INTEGER}
@@ -6,6 +6,9 @@ import java.util.List; @@ -6,6 +6,9 @@ import java.util.List;
6 import java.util.Map; 6 import java.util.Map;
7 import java.util.Set; 7 import java.util.Set;
8 8
  9 +import com.yoho.service.model.union.request.*;
  10 +import com.yoho.service.model.union.response.*;
  11 +import com.yoho.unions.dal.model.*;
9 import com.yoho.unions.server.task.CpsNewUserActivityTask; 12 import com.yoho.unions.server.task.CpsNewUserActivityTask;
10 import org.slf4j.Logger; 13 import org.slf4j.Logger;
11 import org.slf4j.LoggerFactory; 14 import org.slf4j.LoggerFactory;
@@ -33,25 +36,7 @@ import com.yoho.service.model.union.bo.UnionShareOrdersActivityLogsBo; @@ -33,25 +36,7 @@ import com.yoho.service.model.union.bo.UnionShareOrdersActivityLogsBo;
33 import com.yoho.service.model.union.bo.UnionShareUserBankBo; 36 import com.yoho.service.model.union.bo.UnionShareUserBankBo;
34 import com.yoho.service.model.union.bo.UnionShareUserBo; 37 import com.yoho.service.model.union.bo.UnionShareUserBo;
35 import com.yoho.service.model.union.bo.UnionShareVirtualAddBo; 38 import com.yoho.service.model.union.bo.UnionShareVirtualAddBo;
36 -import com.yoho.service.model.union.request.UninoShareIncomeRankReqBo;  
37 -import com.yoho.service.model.union.request.UnionShareMessageReqBO;  
38 -import com.yoho.service.model.union.request.UnionShareOrderReqBO;  
39 -import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;  
40 -import com.yoho.service.model.union.request.UnionShareOrdersMonthReqBO;  
41 -import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;  
42 -import com.yoho.service.model.union.request.UnionShareUserApplyReqBo;  
43 -import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;  
44 -import com.yoho.service.model.union.response.PageResponseBO;  
45 -import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;  
46 -import com.yoho.service.model.union.response.UnionResponse;  
47 -import com.yoho.service.model.union.response.UnionShareStatisticsRspBO;  
48 -import com.yoho.service.model.union.response.UnionShareUserApplyListBo;  
49 -import com.yoho.service.model.union.response.UnionShareUserBankListBO;  
50 import com.yoho.unions.common.ApiResponse; 39 import com.yoho.unions.common.ApiResponse;
51 -import com.yoho.unions.dal.model.UnionShareMessage;  
52 -import com.yoho.unions.dal.model.UnionShareOrders;  
53 -import com.yoho.unions.dal.model.UnionShareOrdersMonth;  
54 -import com.yoho.unions.dal.model.UnionShareSettlement;  
55 import com.yoho.unions.server.service.IUnionShareService; 40 import com.yoho.unions.server.service.IUnionShareService;
56 import com.yoho.unions.server.task.CpsOrderExtraActivityTask; 41 import com.yoho.unions.server.task.CpsOrderExtraActivityTask;
57 42
@@ -273,6 +258,19 @@ public class UnionShareRest { @@ -273,6 +258,19 @@ public class UnionShareRest {
273 } 258 }
274 259
275 /** 260 /**
  261 + * 查询联盟用户列表
  262 + * @param req
  263 + * @return
  264 + */
  265 + @RequestMapping("/queryUnionShareUsers")
  266 + @ResponseBody
  267 + public UnionResponse queryUnionShareUsers(UnionShareUserReqBO req){
  268 + log.info("queryUnionShareUsers parm is {}");
  269 + PageResponseBO<UnionShareUserRspBo> result = unionShareService.queryUnionShareUsers(req);
  270 + return new UnionResponse(200, "queryUnionShareUsers success",result);
  271 + }
  272 +
  273 + /**
276 * 订单明细 274 * 订单明细
277 * Created by qing.zhao on 2018/5/15 275 * Created by qing.zhao on 2018/5/15
278 * @param unionShareOrderReqBO 276 * @param unionShareOrderReqBO
@@ -17,24 +17,9 @@ import com.yoho.service.model.union.bo.UnionShareOrdersActivityLogsBo; @@ -17,24 +17,9 @@ import com.yoho.service.model.union.bo.UnionShareOrdersActivityLogsBo;
17 import com.yoho.service.model.union.bo.UnionShareUserBankBo; 17 import com.yoho.service.model.union.bo.UnionShareUserBankBo;
18 import com.yoho.service.model.union.bo.UnionShareUserBo; 18 import com.yoho.service.model.union.bo.UnionShareUserBo;
19 import com.yoho.service.model.union.bo.UnionShareVirtualAddBo; 19 import com.yoho.service.model.union.bo.UnionShareVirtualAddBo;
20 -import com.yoho.service.model.union.request.UninoShareIncomeRankReqBo;  
21 -import com.yoho.service.model.union.request.UnionShareMessageReqBO;  
22 -import com.yoho.service.model.union.request.UnionShareOrderReqBO;  
23 -import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;  
24 -import com.yoho.service.model.union.request.UnionShareOrdersMonthReqBO;  
25 -import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;  
26 -import com.yoho.service.model.union.request.UnionShareUserApplyReqBo;  
27 -import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;  
28 -import com.yoho.service.model.union.response.PageResponseBO;  
29 -import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;  
30 -import com.yoho.service.model.union.response.UnionShareStatisticsRspBO;  
31 -import com.yoho.service.model.union.response.UnionShareUserApplyListBo;  
32 -import com.yoho.service.model.union.response.UnionShareUserBankListBO;  
33 -import com.yoho.unions.dal.model.UnionShareMessage;  
34 -import com.yoho.unions.dal.model.UnionShareOrders;  
35 -import com.yoho.unions.dal.model.UnionShareOrdersActivity;  
36 -import com.yoho.unions.dal.model.UnionShareOrdersMonth;  
37 -import com.yoho.unions.dal.model.UnionShareSettlement; 20 +import com.yoho.service.model.union.request.*;
  21 +import com.yoho.service.model.union.response.*;
  22 +import com.yoho.unions.dal.model.*;
38 23
39 /** 24 /**
40 * 联盟红人推广返利 25 * 联盟红人推广返利
@@ -228,6 +213,8 @@ public interface IUnionShareService { @@ -228,6 +213,8 @@ public interface IUnionShareService {
228 */ 213 */
229 PageResponseBO<UnionShareUserApplyListBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm); 214 PageResponseBO<UnionShareUserApplyListBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm);
230 215
  216 + PageResponseBO<UnionShareUserRspBo> queryUnionShareUsers(UnionShareUserReqBO req);
  217 +
231 /** 218 /**
232 * 获取返现订单统计信息 219 * 获取返现订单统计信息
233 * @param bo 220 * @param bo
@@ -19,6 +19,8 @@ import java.util.stream.Collectors; @@ -19,6 +19,8 @@ import java.util.stream.Collectors;
19 19
20 import javax.annotation.Resource; 20 import javax.annotation.Resource;
21 21
  22 +import com.yoho.service.model.union.request.*;
  23 +import com.yoho.service.model.union.response.*;
22 import org.apache.commons.collections.CollectionUtils; 24 import org.apache.commons.collections.CollectionUtils;
23 import org.apache.commons.lang3.StringUtils; 25 import org.apache.commons.lang3.StringUtils;
24 import org.elasticsearch.common.collect.Maps; 26 import org.elasticsearch.common.collect.Maps;
@@ -56,20 +58,6 @@ import com.yoho.service.model.union.bo.UnionShareOrdersUidBo; @@ -56,20 +58,6 @@ import com.yoho.service.model.union.bo.UnionShareOrdersUidBo;
56 import com.yoho.service.model.union.bo.UnionShareUserBankBo; 58 import com.yoho.service.model.union.bo.UnionShareUserBankBo;
57 import com.yoho.service.model.union.bo.UnionShareUserBo; 59 import com.yoho.service.model.union.bo.UnionShareUserBo;
58 import com.yoho.service.model.union.bo.UnionShareVirtualAddBo; 60 import com.yoho.service.model.union.bo.UnionShareVirtualAddBo;
59 -import com.yoho.service.model.union.request.UninoShareIncomeRankReqBo;  
60 -import com.yoho.service.model.union.request.UnionShareMessageReqBO;  
61 -import com.yoho.service.model.union.request.UnionShareOrderReqBO;  
62 -import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;  
63 -import com.yoho.service.model.union.request.UnionShareOrdersMonthReqBO;  
64 -import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;  
65 -import com.yoho.service.model.union.request.UnionShareUserApplyReqBo;  
66 -import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;  
67 -import com.yoho.service.model.union.response.PageResponseBO;  
68 -import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;  
69 -import com.yoho.service.model.union.response.UnionShareOrderRspBO;  
70 -import com.yoho.service.model.union.response.UnionShareStatisticsRspBO;  
71 -import com.yoho.service.model.union.response.UnionShareUserApplyListBo;  
72 -import com.yoho.service.model.union.response.UnionShareUserBankListBO;  
73 import com.yoho.unions.common.enums.BankEnum; 61 import com.yoho.unions.common.enums.BankEnum;
74 import com.yoho.unions.common.enums.ShareOrdersKeyEnum; 62 import com.yoho.unions.common.enums.ShareOrdersKeyEnum;
75 import com.yoho.unions.common.enums.ShareOrdersStatusEnum; 63 import com.yoho.unions.common.enums.ShareOrdersStatusEnum;
@@ -435,6 +423,27 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport @@ -435,6 +423,27 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
435 result.setTotal(total); 423 result.setTotal(total);
436 return result; 424 return result;
437 } 425 }
  426 + /**
  427 + * 查询申请记录
  428 + * @param req
  429 + * @return
  430 + */
  431 + @Override
  432 + public PageResponseBO<UnionShareUserRspBo> queryUnionShareUsers(UnionShareUserReqBO req) {
  433 + logger.info("queryUnionShareUsers.req is {}",req);
  434 + int total=this.unionShareUserMapper.selectTotalByCondition(req);
  435 + if(total==0){
  436 + logger.info("queryUnionShareUsers end.req is {},total is 0",req);
  437 + return null;
  438 + }
  439 + List<UnionShareUserRspBo> list=this.unionShareUserMapper.selectByCondition(req);
  440 + PageResponseBO<UnionShareUserRspBo> result=new PageResponseBO<>();
  441 + result.setList(list);
  442 + result.setPage(req.getPage());
  443 + result.setSize(req.getSize());
  444 + result.setTotal(total);
  445 + return result;
  446 + }
438 447
439 private void covertSocialMedia(UnionShareUserApplyListBo bo) { 448 private void covertSocialMedia(UnionShareUserApplyListBo bo) {
440 if (null != bo.getSocialMedia()) { 449 if (null != bo.getSocialMedia()) {
  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <title>Yoho!Buy运营平台</title>
  6 + <script src="/union/js/include.js"></script>
  7 + <script src="/union/js/ajaxfileupload.js"></script>
  8 +</head>
  9 +<body class="easyui-layout" fit="true">
  10 +<div region="north" style="padding-bottom: 35px; height: auto;">
  11 + <script>
  12 + document.write(addHead('CPS联盟管理', 'CPS联盟用户管理'));
  13 + </script>
  14 + <form id="searchForm" method="post" accept-charset="utf-8">
  15 + <div style="margin-left: 10px;margin-top: 10px">
  16 + <label>用户ID:</label>
  17 + <input class="easyui-textbox" id="uid" name="uid"/>
  18 + <label>渠道号:</label>
  19 + <input class="easyui-textbox" id="unionType" name="unionType"/>
  20 + <label>是否有锁粉权限:</label>
  21 + <input class="easyui-combobox" id="specialStatus" name="specialStatus"
  22 + data-options="valueField: 'value',
  23 + textField: 'label',
  24 + data: [{
  25 + label: '是',
  26 + value: '2'
  27 + },{
  28 + label: '否',
  29 + value: '1'
  30 + }]">
  31 + </input>
  32 + <a id="searchBtn" style="margin-left: 20px" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-more'">查询</a>
  33 + </div>
  34 + </form>
  35 +</div>
  36 +<div region="center">
  37 + <div style="margin-left: 30px;margin-top: 20px; height: 500px;">
  38 + <table id="userTable"></table>
  39 + </div>
  40 +</div>
  41 +<script type="text/javascript">
  42 + $(function () {
  43 +
  44 + $("#userTable").myDatagrid({
  45 + fit: true,
  46 + fitColumns: true,
  47 + <!-- idField: "id",-->
  48 + nowrap: false,
  49 + url: contextPath + "/UnionShareRest/queryUnionShareUsers",
  50 + method: 'POST',
  51 + loadFilter: function (data) {
  52 + var temp = defaultLoadFilter(data);
  53 + temp=null==temp?[]:temp;
  54 + temp.rows = temp.list;
  55 + return temp;
  56 + },
  57 + columns: [[{
  58 + title: "用户ID",
  59 + field: "uid",
  60 + width: 200,
  61 + align: "center"
  62 + }, {
  63 + title: "渠道号",
  64 + field: "unionType",
  65 + width: 200,
  66 + align: "center"
  67 + }, {
  68 + title: "是否有锁粉权限",
  69 + field: "specialStatus",
  70 + width: 200,
  71 + align: "center",
  72 + formatter: function (value, rowData, rowIndex) {
  73 + //状态:1-申请中,2-通过,3-拒绝
  74 + if(value == 1) {
  75 + return "否";
  76 + }
  77 + if(value == 2) {
  78 + return "是";
  79 + }
  80 + }
  81 + }, {
  82 + title: "创建时间",
  83 + field: "createTimeStr",
  84 + width: 200,
  85 + align: "center"
  86 + }, {
  87 + title: "更新时间",
  88 + field: "updateTimeStr",
  89 + width: 200,
  90 + align: "center"
  91 + }, {
  92 + title: "参与新人活动id",
  93 + field: "cpsActivityId",
  94 + width: 100,
  95 + align: "center"
  96 + }
  97 + ]],
  98 + cache: false,
  99 + pagination: true,
  100 + pageSize: 10,
  101 + pageList: [10],
  102 + idField: "id",
  103 + singleSelect: false,
  104 + checkOnSelect: false
  105 + });
  106 +
  107 + $("#searchBtn").linkbutton({
  108 + iconCls : "icon-search",
  109 + onClick : function() {
  110 + var param = getParams();
  111 + $("#userTable").myDatagrid("load", param);
  112 + }
  113 + });
  114 +
  115 +
  116 + function getParams() {
  117 + var param = {
  118 + uid:$("#uid").val(),
  119 + unionType:$("#unionType").val(),
  120 + specialStatus:$("#specialStatus").combobox('getValue')
  121 + };
  122 + return param;
  123 + }
  124 +
  125 +
  126 + });
  127 +</script>
  128 +</body>
  129 +</html>