Authored by mingdan.ge

cps用户管理

... ... @@ -93,6 +93,7 @@
<value>/UnionShareRest/checkBankCard</value>
<value>/UnionShareRest/queryUnionShareUserBanks</value>
<value>/UnionShareRest/queryUnionShareUserApplys</value>
<value>/UnionShareRest/queryUnionShareUsers</value>
<value>/UnionShareRest/getSocialMediaBasicParams</value>
<value>/UnionShareRest/cancelUserBanks</value>
<value>/UnionShareRest/updateBankBranch</value>
... ...
package com.yoho.unions.dal;
import com.yoho.service.model.union.request.UnionShareUserReqBO;
import com.yoho.service.model.union.response.UnionShareUserRspBo;
import com.yoho.unions.dal.model.UnionShareUser;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Set;
... ... @@ -20,6 +23,9 @@ public interface UnionShareUserMapper {
int selectCountByUid(Integer uid);
int selectTotalByCondition(UnionShareUserReqBO reqBO);
List<UnionShareUserRspBo> selectByCondition(UnionShareUserReqBO reqBO);
int updateByPrimaryKeySelective(UnionShareUser record);
int updateByUid(UnionShareUser record);
... ...
... ... @@ -31,6 +31,35 @@
select count(1) from union_share_user
where uid = #{uid,jdbcType=INTEGER}
</select>
<select id="selectTotalByCondition" resultType="java.lang.Integer" parameterType="com.yoho.service.model.union.request.UnionShareUserReqBO" >
select count(1) from union_share_user
where status=1
<if test="uid!=null" >
and uid = #{uid,jdbcType=INTEGER}
</if>
<if test="unionType!=null" >
and union_type = #{unionType,jdbcType=VARCHAR}
</if>
<if test="specialStatus!=null" >
and special_status = #{specialStatus,jdbcType=INTEGER}
</if>
</select>
<select id="selectByCondition" resultType="com.yoho.service.model.union.response.UnionShareUserRspBo" parameterType="com.yoho.service.model.union.request.UnionShareUserReqBO" >
select id, uid, union_type unionType, update_time updateTime,create_time createTime,status,apply_id applyId,special_status specialStatus,cps_activity_id cpsActivityId
from union_share_user
where status=1
<if test="uid!=null" >
and uid = #{uid,jdbcType=INTEGER}
</if>
<if test="unionType!=null" >
and union_type = #{unionType,jdbcType=VARCHAR}
</if>
<if test="specialStatus!=null" >
and special_status = #{specialStatus,jdbcType=INTEGER}
</if>
order by create_time desc
limit #{start},#{size}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from union_share_user
where id = #{id,jdbcType=INTEGER}
... ...
... ... @@ -6,6 +6,9 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import com.yoho.service.model.union.request.*;
import com.yoho.service.model.union.response.*;
import com.yoho.unions.dal.model.*;
import com.yoho.unions.server.task.CpsNewUserActivityTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
... ... @@ -33,25 +36,7 @@ import com.yoho.service.model.union.bo.UnionShareOrdersActivityLogsBo;
import com.yoho.service.model.union.bo.UnionShareUserBankBo;
import com.yoho.service.model.union.bo.UnionShareUserBo;
import com.yoho.service.model.union.bo.UnionShareVirtualAddBo;
import com.yoho.service.model.union.request.UninoShareIncomeRankReqBo;
import com.yoho.service.model.union.request.UnionShareMessageReqBO;
import com.yoho.service.model.union.request.UnionShareOrderReqBO;
import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
import com.yoho.service.model.union.request.UnionShareOrdersMonthReqBO;
import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
import com.yoho.service.model.union.request.UnionShareUserApplyReqBo;
import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
import com.yoho.service.model.union.response.PageResponseBO;
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionResponse;
import com.yoho.service.model.union.response.UnionShareStatisticsRspBO;
import com.yoho.service.model.union.response.UnionShareUserApplyListBo;
import com.yoho.service.model.union.response.UnionShareUserBankListBO;
import com.yoho.unions.common.ApiResponse;
import com.yoho.unions.dal.model.UnionShareMessage;
import com.yoho.unions.dal.model.UnionShareOrders;
import com.yoho.unions.dal.model.UnionShareOrdersMonth;
import com.yoho.unions.dal.model.UnionShareSettlement;
import com.yoho.unions.server.service.IUnionShareService;
import com.yoho.unions.server.task.CpsOrderExtraActivityTask;
... ... @@ -273,6 +258,19 @@ public class UnionShareRest {
}
/**
* 查询联盟用户列表
* @param req
* @return
*/
@RequestMapping("/queryUnionShareUsers")
@ResponseBody
public UnionResponse queryUnionShareUsers(UnionShareUserReqBO req){
log.info("queryUnionShareUsers parm is {}");
PageResponseBO<UnionShareUserRspBo> result = unionShareService.queryUnionShareUsers(req);
return new UnionResponse(200, "queryUnionShareUsers success",result);
}
/**
* 订单明细
* Created by qing.zhao on 2018/5/15
* @param unionShareOrderReqBO
... ...
... ... @@ -17,24 +17,9 @@ import com.yoho.service.model.union.bo.UnionShareOrdersActivityLogsBo;
import com.yoho.service.model.union.bo.UnionShareUserBankBo;
import com.yoho.service.model.union.bo.UnionShareUserBo;
import com.yoho.service.model.union.bo.UnionShareVirtualAddBo;
import com.yoho.service.model.union.request.UninoShareIncomeRankReqBo;
import com.yoho.service.model.union.request.UnionShareMessageReqBO;
import com.yoho.service.model.union.request.UnionShareOrderReqBO;
import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
import com.yoho.service.model.union.request.UnionShareOrdersMonthReqBO;
import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
import com.yoho.service.model.union.request.UnionShareUserApplyReqBo;
import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
import com.yoho.service.model.union.response.PageResponseBO;
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionShareStatisticsRspBO;
import com.yoho.service.model.union.response.UnionShareUserApplyListBo;
import com.yoho.service.model.union.response.UnionShareUserBankListBO;
import com.yoho.unions.dal.model.UnionShareMessage;
import com.yoho.unions.dal.model.UnionShareOrders;
import com.yoho.unions.dal.model.UnionShareOrdersActivity;
import com.yoho.unions.dal.model.UnionShareOrdersMonth;
import com.yoho.unions.dal.model.UnionShareSettlement;
import com.yoho.service.model.union.request.*;
import com.yoho.service.model.union.response.*;
import com.yoho.unions.dal.model.*;
/**
* 联盟红人推广返利
... ... @@ -227,7 +212,9 @@ public interface IUnionShareService {
* @return
*/
PageResponseBO<UnionShareUserApplyListBo> queryUnionShareUserApplys(UnionShareUserApplyListReqBo parm);
PageResponseBO<UnionShareUserRspBo> queryUnionShareUsers(UnionShareUserReqBO req);
/**
* 获取返现订单统计信息
* @param bo
... ...
... ... @@ -19,6 +19,8 @@ import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.yoho.service.model.union.request.*;
import com.yoho.service.model.union.response.*;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.elasticsearch.common.collect.Maps;
... ... @@ -56,20 +58,6 @@ import com.yoho.service.model.union.bo.UnionShareOrdersUidBo;
import com.yoho.service.model.union.bo.UnionShareUserBankBo;
import com.yoho.service.model.union.bo.UnionShareUserBo;
import com.yoho.service.model.union.bo.UnionShareVirtualAddBo;
import com.yoho.service.model.union.request.UninoShareIncomeRankReqBo;
import com.yoho.service.model.union.request.UnionShareMessageReqBO;
import com.yoho.service.model.union.request.UnionShareOrderReqBO;
import com.yoho.service.model.union.request.UnionShareOrderSearchReqBO;
import com.yoho.service.model.union.request.UnionShareOrdersMonthReqBO;
import com.yoho.service.model.union.request.UnionShareUserApplyListReqBo;
import com.yoho.service.model.union.request.UnionShareUserApplyReqBo;
import com.yoho.service.model.union.request.UnionShareUserBankListReqBo;
import com.yoho.service.model.union.response.PageResponseBO;
import com.yoho.service.model.union.response.PageUnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionShareOrderRspBO;
import com.yoho.service.model.union.response.UnionShareStatisticsRspBO;
import com.yoho.service.model.union.response.UnionShareUserApplyListBo;
import com.yoho.service.model.union.response.UnionShareUserBankListBO;
import com.yoho.unions.common.enums.BankEnum;
import com.yoho.unions.common.enums.ShareOrdersKeyEnum;
import com.yoho.unions.common.enums.ShareOrdersStatusEnum;
... ... @@ -435,6 +423,27 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
result.setTotal(total);
return result;
}
/**
* 查询申请记录
* @param req
* @return
*/
@Override
public PageResponseBO<UnionShareUserRspBo> queryUnionShareUsers(UnionShareUserReqBO req) {
logger.info("queryUnionShareUsers.req is {}",req);
int total=this.unionShareUserMapper.selectTotalByCondition(req);
if(total==0){
logger.info("queryUnionShareUsers end.req is {},total is 0",req);
return null;
}
List<UnionShareUserRspBo> list=this.unionShareUserMapper.selectByCondition(req);
PageResponseBO<UnionShareUserRspBo> result=new PageResponseBO<>();
result.setList(list);
result.setPage(req.getPage());
result.setSize(req.getSize());
result.setTotal(total);
return result;
}
private void covertSocialMedia(UnionShareUserApplyListBo bo) {
if (null != bo.getSocialMedia()) {
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Yoho!Buy运营平台</title>
<script src="/union/js/include.js"></script>
<script src="/union/js/ajaxfileupload.js"></script>
</head>
<body class="easyui-layout" fit="true">
<div region="north" style="padding-bottom: 35px; height: auto;">
<script>
document.write(addHead('CPS联盟管理', 'CPS联盟用户管理'));
</script>
<form id="searchForm" method="post" accept-charset="utf-8">
<div style="margin-left: 10px;margin-top: 10px">
<label>用户ID:</label>
<input class="easyui-textbox" id="uid" name="uid"/>
<label>渠道号:</label>
<input class="easyui-textbox" id="unionType" name="unionType"/>
<label>是否有锁粉权限:</label>
<input class="easyui-combobox" id="specialStatus" name="specialStatus"
data-options="valueField: 'value',
textField: 'label',
data: [{
label: '是',
value: '2'
},{
label: '否',
value: '1'
}]">
</input>
<a id="searchBtn" style="margin-left: 20px" class="easyui-linkbutton btn-primary" data-options="iconCls:'icon-more'">查询</a>
</div>
</form>
</div>
<div region="center">
<div style="margin-left: 30px;margin-top: 20px; height: 500px;">
<table id="userTable"></table>
</div>
</div>
<script type="text/javascript">
$(function () {
$("#userTable").myDatagrid({
fit: true,
fitColumns: true,
<!-- idField: "id",-->
nowrap: false,
url: contextPath + "/UnionShareRest/queryUnionShareUsers",
method: 'POST',
loadFilter: function (data) {
var temp = defaultLoadFilter(data);
temp=null==temp?[]:temp;
temp.rows = temp.list;
return temp;
},
columns: [[{
title: "用户ID",
field: "uid",
width: 200,
align: "center"
}, {
title: "渠道号",
field: "unionType",
width: 200,
align: "center"
}, {
title: "是否有锁粉权限",
field: "specialStatus",
width: 200,
align: "center",
formatter: function (value, rowData, rowIndex) {
//状态:1-申请中,2-通过,3-拒绝
if(value == 1) {
return "否";
}
if(value == 2) {
return "是";
}
}
}, {
title: "创建时间",
field: "createTimeStr",
width: 200,
align: "center"
}, {
title: "更新时间",
field: "updateTimeStr",
width: 200,
align: "center"
}, {
title: "参与新人活动id",
field: "cpsActivityId",
width: 100,
align: "center"
}
]],
cache: false,
pagination: true,
pageSize: 10,
pageList: [10],
idField: "id",
singleSelect: false,
checkOnSelect: false
});
$("#searchBtn").linkbutton({
iconCls : "icon-search",
onClick : function() {
var param = getParams();
$("#userTable").myDatagrid("load", param);
}
});
function getParams() {
var param = {
uid:$("#uid").val(),
unionType:$("#unionType").val(),
specialStatus:$("#specialStatus").combobox('getValue')
};
return param;
}
});
</script>
</body>
</html>
\ No newline at end of file
... ...