Commit 35b2784e by yao.xiao

关账接口

parent f6a2832c
...@@ -116,8 +116,8 @@ public class AgmsController { ...@@ -116,8 +116,8 @@ public class AgmsController {
/** /**
* AGMS -- 商机统计报表 * AGMS -- 商机统计报表
* @param requestVO * @param requestVO requestVO
* @return * @return 响应数据
*/ */
@RequestMapping(value="/leadsStatistics") @RequestMapping(value="/leadsStatistics")
public Object leadsStatistics(@RequestBody LeadsStatisticsRequestVO requestVO,HttpServletResponse response) { public Object leadsStatistics(@RequestBody LeadsStatisticsRequestVO requestVO,HttpServletResponse response) {
...@@ -148,7 +148,7 @@ public class AgmsController { ...@@ -148,7 +148,7 @@ public class AgmsController {
* @return 响应数据 * @return 响应数据
*/ */
@RequestMapping(value="/commissionPayoutStatusQuery") @RequestMapping(value="/commissionPayoutStatusQuery")
public Object commissionPayoutStatusQuery(@RequestBody CommissionPayoutStatusQueryRequestVO requestVO) throws InvocationTargetException, IllegalAccessException { public Object commissionPayoutStatusQuery(@RequestBody CommissionPayoutStatusQueryRequestVO requestVO){
JsonResult result = new JsonResult(); JsonResult result = new JsonResult();
CommissionPayoutStatusQueryResponseVO responseVO = agmsFortuneService.commissionPayoutStatusQuery(requestVO); CommissionPayoutStatusQueryResponseVO responseVO = agmsFortuneService.commissionPayoutStatusQuery(requestVO);
result.setData(responseVO); result.setData(responseVO);
...@@ -162,7 +162,7 @@ public class AgmsController { ...@@ -162,7 +162,7 @@ public class AgmsController {
* @return 响应数据 * @return 响应数据
*/ */
@RequestMapping("/withdrawQuery") @RequestMapping("/withdrawQuery")
public Object withdrawQuery(@RequestBody WithdrawQueryRequestVO requestVO) throws InvocationTargetException, IllegalAccessException { public Object withdrawQuery(@RequestBody WithdrawQueryRequestVO requestVO){
JsonResult result = new JsonResult(); JsonResult result = new JsonResult();
WithdrawQueryResponseVO withdrawQueryResponseVO = agmsFortuneService.withdrawQuery(requestVO); WithdrawQueryResponseVO withdrawQueryResponseVO = agmsFortuneService.withdrawQuery(requestVO);
result.addResult(withdrawQueryResponseVO); result.addResult(withdrawQueryResponseVO);
...@@ -184,4 +184,17 @@ public class AgmsController { ...@@ -184,4 +184,17 @@ public class AgmsController {
return result; return result;
} }
/**
* AGMS -- 财富批量支付
* @param requestVO 请求数据
* @return 响应数据
*/
@RequestMapping(value="/fortunePay")
public Object fortunePay(@RequestBody FortunePayRequestVO requestVO) {
JsonResult result = new JsonResult();
FortunePayResponseVO responseVO = agmsFortuneService.fortunePay(requestVO);
result.setData(responseVO);
result.addResult(responseVO);
return result;
}
} }
...@@ -22,14 +22,14 @@ public interface AgmsFortuneService { ...@@ -22,14 +22,14 @@ public interface AgmsFortuneService {
* @throws InvocationTargetException InvocationTargetException * @throws InvocationTargetException InvocationTargetException
* @throws IllegalAccessException IllegalAccessException * @throws IllegalAccessException IllegalAccessException
*/ */
CommissionPayoutStatusQueryResponseVO commissionPayoutStatusQuery(CommissionPayoutStatusQueryRequestVO requestVO) throws InvocationTargetException, IllegalAccessException; CommissionPayoutStatusQueryResponseVO commissionPayoutStatusQuery(CommissionPayoutStatusQueryRequestVO requestVO);
/** /**
* AGMS -- 支付列表查询 * AGMS -- 支付列表查询
* @param requestVO 请求数据 * @param requestVO 请求数据
* @return 响应数据 * @return 响应数据
*/ */
WithdrawQueryResponseVO withdrawQuery(WithdrawQueryRequestVO requestVO) throws InvocationTargetException, IllegalAccessException ; WithdrawQueryResponseVO withdrawQuery(WithdrawQueryRequestVO requestVO);
/** /**
* AGMS -- 提现财富对应订单查询 * AGMS -- 提现财富对应订单查询
...@@ -37,4 +37,11 @@ public interface AgmsFortuneService { ...@@ -37,4 +37,11 @@ public interface AgmsFortuneService {
* @return 响应数据 * @return 响应数据
*/ */
FortunePayToOrderResponseVO fortunePayToOrder(FortunePayToOrderRequestVO requestVO); FortunePayToOrderResponseVO fortunePayToOrder(FortunePayToOrderRequestVO requestVO);
/**
* AGMS -- 财富批量支付
* @param requestVO 请求数据
* @return 响应数据
*/
FortunePayResponseVO fortunePay(FortunePayRequestVO requestVO);
} }
package com.yd.api.agms.vo.fortune;
import lombok.Data;
/**
* @author xxy
*/
@Data
public class FortunePayRequestVO {
private Long[] payIds;
private Long loginId;
}
package com.yd.api.agms.vo.fortune;
import com.yd.api.result.CommonResult;
import lombok.Data;
/**
* @author xxy
*/
@Data
public class FortunePayResponseVO {
private CommonResult commonResult;
}
package com.yd.dal.entity.customer;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
/**
* 用户财富最终统计结果
*/
@Data
public class AclCustomerFortuneStatistic {
/**
* serial id
*/
private Long id;
/**
* FK ag_acl_customer.id
*/
private Long customerId;
/**
* 历史累积财富
*/
private BigDecimal accumulatedFortune;
/**
* 已提现财富
*/
private BigDecimal drawnFortune;
/**
* 已退保财富
*/
private BigDecimal cancelledFortune;
/**
* 注释或补充
*/
private String remark;
private Date createdAt;
private Long createdBy;
private Date updatedAt;
/**
* 变更者 id
*/
private Long updatedBy;
}
\ No newline at end of file
...@@ -24,4 +24,6 @@ public interface AclCustomerFortunePayMapper { ...@@ -24,4 +24,6 @@ public interface AclCustomerFortunePayMapper {
int batchInsert(@Param("list") List<AclCustomerFortunePay> list); int batchInsert(@Param("list") List<AclCustomerFortunePay> list);
List<AclCustomerFortunePay> findByWithdrawIds(List<Long> withdrawIds); List<AclCustomerFortunePay> findByWithdrawIds(List<Long> withdrawIds);
List<AclCustomerFortunePay> findByIds(Long[] payIds);
} }
\ No newline at end of file
package com.yd.dal.mapper.customer;
import com.yd.dal.entity.customer.AclCustomerFortuneStatistic;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AclCustomerFortuneStatisticMapper {
int deleteByPrimaryKey(Long id);
int insert(AclCustomerFortuneStatistic record);
int insertSelective(AclCustomerFortuneStatistic record);
AclCustomerFortuneStatistic selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AclCustomerFortuneStatistic record);
int updateByPrimaryKey(AclCustomerFortuneStatistic record);
int updateBatch(List<AclCustomerFortuneStatistic> list);
int updateBatchSelective(List<AclCustomerFortuneStatistic> list);
int batchInsert(@Param("list") List<AclCustomerFortuneStatistic> list);
List<AclCustomerFortuneStatistic> findByCustomerIds(Long[] customerIds);
}
\ No newline at end of file
...@@ -23,4 +23,11 @@ public interface AclCustomerFortunePayDALService { ...@@ -23,4 +23,11 @@ public interface AclCustomerFortunePayDALService {
void updateAll(List<AclCustomerFortunePay> pays); void updateAll(List<AclCustomerFortunePay> pays);
Long save(AclCustomerFortunePay pay); Long save(AclCustomerFortunePay pay);
/**
* 批量查询
* @param payIds payIds
* @return 列表
*/
List<AclCustomerFortunePay> findByIds(Long[] payIds);
} }
package com.yd.dal.service.customer;
import com.yd.dal.entity.customer.AclCustomerFortuneStatistic;
import java.util.List;
/**
* @author xxy
*/
public interface AclCustomerFortuneStatisticDALService {
/**
* 通过customerIds查询静态表
* @param customerIds customerIds
* @return 列表
*/
List<AclCustomerFortuneStatistic> findByCustomerIds(Long[] customerIds);
void updateAll(List<AclCustomerFortuneStatistic> customerFortuneStatistics);
}
...@@ -31,4 +31,9 @@ public class AclCustomerFortunePayDALServiceImpl implements AclCustomerFortunePa ...@@ -31,4 +31,9 @@ public class AclCustomerFortunePayDALServiceImpl implements AclCustomerFortunePa
public Long save(AclCustomerFortunePay pay) { public Long save(AclCustomerFortunePay pay) {
return (long)customerFortunePayMapper.insert(pay); return (long)customerFortunePayMapper.insert(pay);
} }
@Override
public List<AclCustomerFortunePay> findByIds(Long[] payIds) {
return customerFortunePayMapper.findByIds(payIds);
}
} }
package com.yd.dal.service.customer.impl;
import com.yd.dal.entity.customer.AclCustomerFortuneStatistic;
import com.yd.dal.mapper.customer.AclCustomerFortuneStatisticMapper;
import com.yd.dal.service.customer.AclCustomerFortuneStatisticDALService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author xxy
*/
@Service("aclCustomerFortuneStatisticDALService")
public class AclCustomerFortuneStatisticDALServiceImpl implements AclCustomerFortuneStatisticDALService {
@Autowired
private AclCustomerFortuneStatisticMapper customerFortuneStatisticMapper;
@Override
public List<AclCustomerFortuneStatistic> findByCustomerIds(Long[] customerIds) {
return customerFortuneStatisticMapper.findByCustomerIds(customerIds);
}
@Override
public void updateAll(List<AclCustomerFortuneStatistic> customerFortuneStatistics) {
customerFortuneStatisticMapper.updateBatch(customerFortuneStatistics);
}
}
...@@ -35,4 +35,5 @@ ...@@ -35,4 +35,5 @@
830019=已申请过专家支持!请等待 830019=已申请过专家支持!请等待
830020=活动时间段冲突 830020=活动时间段冲突
830021=请选择发佣日期 830021=请选择发佣日期
830022=请选择关账记录
900003=保险公司响应报文为空! 900003=保险公司响应报文为空!
\ No newline at end of file
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<result column="campaign_name" jdbcType="VARCHAR" property="campaignName" /> <result column="campaign_name" jdbcType="VARCHAR" property="campaignName" />
<result column="campaing_reward" jdbcType="DECIMAL" property="campaingReward" /> <result column="campaing_reward" jdbcType="DECIMAL" property="campaingReward" />
<result column="pay_to" jdbcType="VARCHAR" property="payTo" /> <result column="pay_to" jdbcType="VARCHAR" property="payTo" />
<result column="pay_to_mobile" jdbcType="VARCHAR" property="payToMobile" /> <result column="pay_to_mobile" jdbcType="VARCHAR" property="payToMobile" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="pay_to_wechat" jdbcType="VARCHAR" property="payToWechat" /> <result column="pay_to_wechat" jdbcType="VARCHAR" property="payToWechat" />
<result column="pay_to_id_type_id" jdbcType="BIGINT" property="payToIdTypeId" /> <result column="pay_to_id_type_id" jdbcType="BIGINT" property="payToIdTypeId" />
<result column="pay_to_id_no" jdbcType="VARCHAR" property="payToIdNo" /> <result column="pay_to_id_no" jdbcType="VARCHAR" property="payToIdNo" typeHandler="com.yd.util.deshandler.DESTypeHandler"/>
<result column="pay_to_birthday" jdbcType="DATE" property="payToBirthday" /> <result column="pay_to_birthday" jdbcType="DATE" property="payToBirthday" />
<result column="pay_to_gender" jdbcType="INTEGER" property="payToGender" /> <result column="pay_to_gender" jdbcType="INTEGER" property="payToGender" />
<result column="pay_date" jdbcType="TIMESTAMP" property="payDate" /> <result column="pay_date" jdbcType="TIMESTAMP" property="payDate" />
...@@ -63,8 +63,8 @@ ...@@ -63,8 +63,8 @@
updated_by) updated_by)
values (#{withdrawId,jdbcType=BIGINT}, #{withdrawAmount,jdbcType=DECIMAL}, #{customerId,jdbcType=BIGINT}, values (#{withdrawId,jdbcType=BIGINT}, #{withdrawAmount,jdbcType=DECIMAL}, #{customerId,jdbcType=BIGINT},
#{customerName,jdbcType=VARCHAR}, #{campaignId,jdbcType=BIGINT}, #{campaignName,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, #{campaignId,jdbcType=BIGINT}, #{campaignName,jdbcType=VARCHAR},
#{campaingReward,jdbcType=DECIMAL}, #{payTo,jdbcType=VARCHAR}, #{payToMobile,jdbcType=VARCHAR}, #{campaingReward,jdbcType=DECIMAL}, #{payTo,jdbcType=VARCHAR}, #{payToMobile,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
#{payToWechat,jdbcType=VARCHAR}, #{payToIdTypeId,jdbcType=BIGINT}, #{payToIdNo,jdbcType=VARCHAR}, #{payToWechat,jdbcType=VARCHAR}, #{payToIdTypeId,jdbcType=BIGINT}, #{payToIdNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
#{payToBirthday,jdbcType=DATE}, #{payToGender,jdbcType=INTEGER}, #{payDate,jdbcType=TIMESTAMP}, #{payToBirthday,jdbcType=DATE}, #{payToGender,jdbcType=INTEGER}, #{payDate,jdbcType=TIMESTAMP},
#{payAmount,jdbcType=DECIMAL}, #{taxAmount,jdbcType=DECIMAL}, #{paidBy,jdbcType=VARCHAR}, #{payAmount,jdbcType=DECIMAL}, #{taxAmount,jdbcType=DECIMAL}, #{paidBy,jdbcType=VARCHAR},
#{paidMethod,jdbcType=INTEGER}, #{payStatus,jdbcType=INTEGER}, #{remark,jdbcType=LONGVARCHAR}, #{paidMethod,jdbcType=INTEGER}, #{payStatus,jdbcType=INTEGER}, #{remark,jdbcType=LONGVARCHAR},
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
#{payTo,jdbcType=VARCHAR}, #{payTo,jdbcType=VARCHAR},
</if> </if>
<if test="payToMobile != null"> <if test="payToMobile != null">
#{payToMobile,jdbcType=VARCHAR}, #{payToMobile,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
</if> </if>
<if test="payToWechat != null"> <if test="payToWechat != null">
#{payToWechat,jdbcType=VARCHAR}, #{payToWechat,jdbcType=VARCHAR},
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
#{payToIdTypeId,jdbcType=BIGINT}, #{payToIdTypeId,jdbcType=BIGINT},
</if> </if>
<if test="payToIdNo != null"> <if test="payToIdNo != null">
#{payToIdNo,jdbcType=VARCHAR}, #{payToIdNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
</if> </if>
<if test="payToBirthday != null"> <if test="payToBirthday != null">
#{payToBirthday,jdbcType=DATE}, #{payToBirthday,jdbcType=DATE},
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
pay_to = #{payTo,jdbcType=VARCHAR}, pay_to = #{payTo,jdbcType=VARCHAR},
</if> </if>
<if test="payToMobile != null"> <if test="payToMobile != null">
pay_to_mobile = #{payToMobile,jdbcType=VARCHAR}, pay_to_mobile = #{payToMobile,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
</if> </if>
<if test="payToWechat != null"> <if test="payToWechat != null">
pay_to_wechat = #{payToWechat,jdbcType=VARCHAR}, pay_to_wechat = #{payToWechat,jdbcType=VARCHAR},
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
pay_to_id_type_id = #{payToIdTypeId,jdbcType=BIGINT}, pay_to_id_type_id = #{payToIdTypeId,jdbcType=BIGINT},
</if> </if>
<if test="payToIdNo != null"> <if test="payToIdNo != null">
pay_to_id_no = #{payToIdNo,jdbcType=VARCHAR}, pay_to_id_no = #{payToIdNo,jdbcType=VARCHAR,typeHandler=com.yd.util.deshandler.DESTypeHandler},
</if> </if>
<if test="payToBirthday != null"> <if test="payToBirthday != null">
pay_to_birthday = #{payToBirthday,jdbcType=DATE}, pay_to_birthday = #{payToBirthday,jdbcType=DATE},
...@@ -692,4 +692,14 @@ ...@@ -692,4 +692,14 @@
#{item} #{item}
</foreach> </foreach>
</select> </select>
<select id="findByIds" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ag_acl_customer_fortune_pay
where id in
<foreach collection="array" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</select>
</mapper> </mapper>
\ No newline at end of file
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