Authored by mingdan.ge

no message

... ... @@ -37,6 +37,7 @@
from union_share_user usu
<if test="identityStatus != null">
left join union_share_user_identity_card usui on usu.uid = usui.uid
and usui.id =(select max(id) from union_share_user_identity_card where uid = usu.uid)
</if>
where usu.status=1
<if test="uid!=null" >
... ... @@ -49,18 +50,23 @@
and usu.special_status = #{specialStatus,jdbcType=INTEGER}
</if>
<if test="identityStatus != null" >
and usui.status = #{identityStatus,jdbcType=INTEGER}
and usui.status = 1
<if test="identityStatus == 1">
and usui.status = #{identityStatus,jdbcType=INTEGER}
</if>
<if test="identityStatus == 0">
and usui.status = #{identityStatus,jdbcType=INTEGER} or usui.status is null
</if>
</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
select usu.id, usu.uid, usu.union_type unionType, usu.update_time updateTime,usu.create_time createTime,usu.status,usu.apply_id applyId,usu.special_status specialStatus,usu.cps_activity_id cpsActivityId
<if test="identityStatus != null">
,usui.status as identityStatus
</if>
from union_share_user usu
<if test="identityStatus != null">
left join union_share_user_identity_card usui on usu.uid = usui.uid
and usui.id =(select max(id) from union_share_user_identity_card where uid = usu.uid)
</if>
where usu.status=1
<if test="uid != null" >
... ... @@ -73,8 +79,12 @@
and usu.special_status = #{specialStatus,jdbcType=INTEGER}
</if>
<if test="identityStatus != null" >
and usui.status = #{identityStatus,jdbcType=INTEGER}
and usui.status = 1
<if test="identityStatus == 1">
and usui.status = #{identityStatus,jdbcType=INTEGER}
</if>
<if test="identityStatus == 0">
and usui.status = #{identityStatus,jdbcType=INTEGER} or usui.status is null
</if>
</if>
order by usu.create_time desc
limit #{start},#{size}
... ...
... ... @@ -1646,7 +1646,20 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
if (CollectionUtils.isNotEmpty(unionShareSettlementList)){
DecimalFormat df1 = new DecimalFormat("0.00");
for (UnionShareSettlement unionShareSettlement : unionShareSettlementList){
unionShareSettlement.setSettlementAmountStr("+"+df1.format(unionShareSettlement.getSettlementAmount()));
//提现总金额:¥688
unionShareSettlement.setSettlementAmountStr("¥"+df1.format(unionShareSettlement.getSettlementAmount()));
if(unionShareSettlement.getTaxAmount()!=null && unionShareSettlement.getAfterTaxAmount()!=null){
//税后总收益:¥619.2
unionShareSettlement.setAfterTaxAmountStr("¥"+df1.format(unionShareSettlement.getAfterTaxAmount()));
//扣税总金额:¥68.8(10%)
BigDecimal taxRatio = unionShareSettlement.getAfterTaxAmount()
.divide(unionShareSettlement.getSettlementAmount(), 2, BigDecimal.ROUND_HALF_UP)
.multiply(new BigDecimal(100))
.setScale(0, BigDecimal.ROUND_HALF_UP);
unionShareSettlement.setTaxAmountStr("¥"+df1.format(unionShareSettlement.getTaxAmount())
+ "(" + taxRatio + "%)");
}
unionShareSettlement.setSettlementTimeStr(DateUtils.int2DateStr(unionShareSettlement.getSettlementTime(), DateUtils.POINT_FOMARTPATTER));
if (unionShareSettlement.getStatus() == 1){
unionShareSettlement.setSettlementStatus("处理中");
... ...
... ... @@ -131,11 +131,10 @@
width: 200,
align: "center",
formatter: function (value, rowData, rowIndex) {
if(value == 0) {
return "未上传";
}
if(value == 1) {
return "已上传";
}else{
return "未上传";
}
}
}, {
... ... @@ -165,7 +164,7 @@
str += "<a role='pass' dataId='" + rowData.id + "' style='margin-left:10px'>开通锁粉</a>";
}
str = "<a role='userIdentity' dataId='" + rowData.uid + "' style='margin-left:10px'>身份信息</a>";
str = "<a role='userIdentity' dataId='" + rowData.uid + "' style='margin-left:10px'>身份信息驳回</a>";
return str;
}
}
... ... @@ -191,26 +190,6 @@
iconCls: "icon-more",
onClick: function () {
var uid=$(this).attr("dataId");
userIdentity(uid);
}
});
}
});
function userIdentity(uid) {
var div = $("<div>").appendTo($(window.self.document.body));
window.self.$(div).myDialog({
modal : true,
collapsible : true,
cache : false,
title : "身份信息",
width: 690,
height: 600,
href: contextPath + "/html/unionshare/userIdentity.html?uid="+uid,
buttons : [{
text : "驳回",
iconCls : "icon-save",
handler : function() {
var param = {};
param.uid = uid;
$.ajax({
... ... @@ -222,7 +201,6 @@
success: function(result) {
if(result.data){
window.self.$.messager.alert("提示消息","操作成功");
window.self.$(div).dialog('close');
}else {
window.self.$.messager.alert("操作失败",result.message);
}
... ... @@ -230,16 +208,10 @@
}
});
}
},{
id : "closeBtn",
text : "关闭",
iconCls : "icon-cancel",
handler : function() {
window.self.$(div).dialog('close');
}
}]
});
}
});
}
});
function resetSelectedCheckBox(data){
$("input[type='checkbox'][name='id']").each(function () {
var cb=$(this);
... ...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Yoho!Buy运营平台</title>
<script src="/union/js/include.js"></script>
<style>
.row-input {
width:95%;
heigth: 40px;
line-height: 40px;
margin-top:15px;
font-size: 16px;
display: block;
}
.row-input .row-left {
padding-left: 22px;
width: 100px;
display: block;
float: left;
}
.row-input .row-right {
width: auto;
display: inline-block;
}
</style>
<script>
function getQueryString(url,name) {
var i=url.lastIndexOf('?');
if(i==-1)return;
var querystr=url.substr(i+1);
var arr1=querystr.split('&');
var arr2=new Object();
for (i in arr1){
var ta=arr1[i].split('=');
arr2[ta[0]]=ta[1];
}
return arr2[name];
}
</script>
</head>
<body class="easyui-layout" fit="true">
<div region="north" style="height: 100px; border-bottom: 0;">
<script>
document.write(addHead('CPS联盟管理', 'CPS消息管理'));
</script>
</div>
<div region="center" style="margin: 10px;border: 1px solid #D7D7D7;">
<form id="activityEditForm" name="activityEditForm" method="post">
<div class="row-input">
<div class="row-left">
真实姓名:
</div>
<div class="row-right">
<div id="name" name="name" style="width:500px"></div>
</div>
</div>
<div class="row-input">
<div class="row-left">
是否上传:
</div>
<div class="row-right">
<div id="identityStatus"></div>
</div>
</div>
<div class="row-input">
<div class="row-left">
身份照片:
</div>
</div>
<div class="row-input">
<div id="imageLeft"></div>
<div id="imageRight"></div>
</div>
</form>
</div>
<script>
function initForm(){
var param=window.location.search;
var uid = getQueryString(param, "uid");
$.post(contextPath + "/UnionShareRest/getIdentityCard", {
uid : uid
}, function(data) {
if (data.code == 200) {
$("#name").html(data.data.name);
if(data.data.status == 1){
$("#identityStatus").html("未上传");
}else if(data.data.status == 0){
$("#identityStatus").html("已上传");
}
$("#imageLeft").html("<a src='"+data.data.cardFrontUrl+"'></a>");
$("#imageRight").html("<a src='"+data.data.cardBackUrl+"'></a>");
}else {
window.self.$.messager.alert("失败", "失败!", "error");
}
});
}
$(function () {
initForm();
});
</script>
</body>
</html>
\ No newline at end of file