Commit f8a36408 by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !8
parents 0f061c93 9529ccd4
......@@ -12,6 +12,7 @@ import java.io.Serializable;
*/
public class ApprovalCallBackDTO implements Serializable {
private static final long serialVersionUID = -4804678123408738557L;
public interface ApprovalValid{}
@NotBlank(message = "申请单号不能为空", groups = ApprovalValid.class)
......@@ -31,6 +32,16 @@ public class ApprovalCallBackDTO implements Serializable {
private String timeEnd;
private String prepayId;
private String onlineSerialNumber;
public String getOnlineSerialNumber() {
return onlineSerialNumber;
}
public void setOnlineSerialNumber(String onlineSerialNumber) {
this.onlineSerialNumber = onlineSerialNumber;
}
public String getOrderSerialNumber() {
return orderSerialNumber;
}
......
......@@ -24,6 +24,7 @@ public class BillingRechargeDTO implements Serializable {
private Integer resultCode;
private String errCode;
private String errorCodeDes;
private String onlineSerialNumber;
public Integer getPayType() {
......@@ -137,4 +138,12 @@ public class BillingRechargeDTO implements Serializable {
public void setInitiatorName(String initiatorName) {
this.initiatorName = initiatorName;
}
public String getOnlineSerialNumber() {
return onlineSerialNumber;
}
public void setOnlineSerialNumber(String onlineSerialNumber) {
this.onlineSerialNumber = onlineSerialNumber;
}
}
......@@ -45,7 +45,7 @@ public class BillingRechargeRecordDTO implements Serializable {
*/
private Integer status;
/**
* 发起方 1:运维平台
* 发起方 1商户 2运维
*/
private Integer initiator;
/**
......@@ -94,6 +94,11 @@ public class BillingRechargeRecordDTO implements Serializable {
private String approvalName;
private String approvalPhone;
/**
* 第三方的交易单号(微信)
*/
private String onlineSerialNumber;
public Integer getRechargeRecordId() {
return rechargeRecordId;
}
......@@ -310,4 +315,11 @@ public class BillingRechargeRecordDTO implements Serializable {
this.initiatorName = initiatorName;
}
public String getOnlineSerialNumber() {
return onlineSerialNumber;
}
public void setOnlineSerialNumber(String onlineSerialNumber) {
this.onlineSerialNumber = onlineSerialNumber;
}
}
\ No newline at end of file
......@@ -56,7 +56,7 @@ public interface TabBillingRechargeRecordMapper {
Page<TabBillingRechargeRecord> listRechargeRecord(RechargeRecordQO rechargeRecordQO);
void updateBySerialNumber(@Param("orderSerialNumber") String orderSerialNumber, @Param("totalFeePaid") Double totalFeePaid, @Param("auditStatus") Integer auditStatus, @Param("timeEnd") String timeEnd);
void updateBySerialNumber(@Param("orderSerialNumber") String orderSerialNumber, @Param("totalFeePaid") Double totalFeePaid, @Param("auditStatus") Integer auditStatus, @Param("timeEnd") String timeEnd, @Param("onlineSerialNumber") String onlineSerialNumber);
TabBillingRechargeRecord getAuditingRechargeRecord(@Param("enterpriseId") Integer enterpriseId);
......
......@@ -22,6 +22,11 @@ public class TabBillingRechargeRecord {
private String serialNumber;
/**
* 第三方的交易单号(微信)
*/
private String onlineSerialNumber;
/**
* 充值金额
*/
private Double totalFee;
......@@ -32,7 +37,7 @@ public class TabBillingRechargeRecord {
private Double totalFeePaid;
/**
* 支付方式 1微信 2支付宝 3.线下支付
* 支付方式 支付方式 1微信 2支付宝 3.银行对公转账 4余额支付
*/
private Integer payType;
......@@ -47,7 +52,7 @@ public class TabBillingRechargeRecord {
private Integer status;
/**
* 发起方 1:运维平
* 发起方 1:商户 2运维后
*/
private Integer initiator;
......@@ -62,7 +67,7 @@ public class TabBillingRechargeRecord {
private String initiatorName;
/**
* 0:已关闭 1:待支付,2:已完成,3:审核中,4:审核失败
* 0:"待支付", 1:"审核中", 2:"已取消", 3:"审核失败", 4:"已完成"
*/
private Integer auditStatus;
......@@ -110,6 +115,14 @@ public class TabBillingRechargeRecord {
this.serialNumber = serialNumber;
}
public String getOnlineSerialNumber() {
return onlineSerialNumber;
}
public void setOnlineSerialNumber(String onlineSerialNumber) {
this.onlineSerialNumber = onlineSerialNumber;
}
public Double getTotalFee() {
return totalFee;
}
......
......@@ -19,7 +19,7 @@ public interface BillingRechargeRecordService {
Page<TabBillingRechargeRecord> listRechargeRecord(RechargeRecordQO rechargeRecordQO);
void updateBySerialNumber(Integer enterpriseId, String orderSerialNumber, Double totalFee, Double totalFeePaid, Integer code, String timeEnd);
void updateBySerialNumber(Integer enterpriseId, String orderSerialNumber, Double totalFee, Double totalFeePaid, Integer auditStatus, String timeEnd, String onlineSerialNumber);
TabBillingRechargeRecord getRechargeRecord(Integer rechargeRecordId);
......
......@@ -78,9 +78,9 @@ public class BillingRechargeRecordServiceImpl implements BillingRechargeRecordSe
}
@Override
public void updateBySerialNumber(Integer enterpriseId, String orderSerialNumber, Double totalFee, Double totalFeePaid, Integer auditStatus, String timeEnd) {
public void updateBySerialNumber(Integer enterpriseId, String orderSerialNumber, Double totalFee, Double totalFeePaid, Integer auditStatus, String timeEnd, String onlineSerialNumber) {
// 修改订单状态
tabBillingRechargeRecordMapper.updateBySerialNumber(orderSerialNumber, totalFeePaid, auditStatus, timeEnd);
tabBillingRechargeRecordMapper.updateBySerialNumber(orderSerialNumber, totalFeePaid, auditStatus, timeEnd, onlineSerialNumber);
// 给账户充值
if (BillingAuditStatusEnum.PASS.getCode().equals(auditStatus)) {
billingAccountService.updateAccountAfterRechargeOrRefund(totalFee, enterpriseId);
......
......@@ -120,6 +120,7 @@ public class BillingPayInfoApiServiceImpl implements BillingPayInfoApiService {
approvalCallBackDTO.setPrepayId(resData.getPrepay_id());
approvalCallBackDTO.setResultCode(StringUtils.equalsIgnoreCase(resData.getResult_code(), "SUCCESS") ? 1 : 0);
approvalCallBackDTO.setTotalFeePaid(new BigDecimal(resData.getTotal_fee()).divide(new BigDecimal("100"), 5, RoundingMode.HALF_UP).doubleValue());
approvalCallBackDTO.setOnlineSerialNumber(resData.getTransaction_id());
return strategyMap.get(PayTypeEnum.WE_CHAT_PAY.getCode() + "").callBack(approvalCallBackDTO);
}
......
......@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.constant.BillingAuditStatusEnum;
import com.gic.enterprise.constant.PayTypeEnum;
import com.gic.enterprise.dto.BillingRechargeRecordDTO;
import com.gic.enterprise.entity.TabBillingPayInfo;
import com.gic.enterprise.entity.TabBillingRechargeRecord;
......@@ -66,6 +67,11 @@ public class BillingRechargeRecordApiServiceImpl implements BillingRechargeRecor
resultRechargeRecordDTO.setApprovalId(serviceResult.getApprovalId());
resultRechargeRecordDTO.setApprovalName(serviceResult.getApprovalName());
}
// 如果是微信支付 要把交易单号设置为交易流水
if (resultRechargeRecordDTO.getPayType() == PayTypeEnum.WE_CHAT_PAY.getCode()) {
resultRechargeRecordDTO.setPayInfoSerialNumber(resultRechargeRecordDTO.getOnlineSerialNumber());
}
return ServiceResponse.success(resultRechargeRecordDTO);
}
......
......@@ -244,11 +244,11 @@ public class SmsRecordApiServiceImpl implements SmsRecordApiService {
*/
private void setUserName(SmsRecordDTO smsRecordDTO) {
if (smsRecordDTO.getUserId() != null) {
ServiceResponse<UserDTO> userResp = userApiService.getUserById(smsRecordDTO.getUserId());
ServiceResponse<UserDTO> userResp = userApiService.getUserInfoById(smsRecordDTO.getUserId());
if (userResp.isSuccess()) {
UserDTO userDTO = userResp.getResult();
if (userDTO != null) {
smsRecordDTO.setUserName(smsRecordDTO.getUserName());
smsRecordDTO.setUserName(userDTO.getUserName());
}
} else {
logger.info("userId:{}, UserApiService.getUserById 调用失败:{}", smsRecordDTO.getUserId(), userResp.getMessage());
......
......@@ -18,7 +18,6 @@ import com.gic.enterprise.entity.TabEnterprise;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.*;
import com.gic.enterprise.utils.CreateRandomUtils;
import com.gic.finance.constant.InitiatorTypeEnum;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.service.TransferAccountsApprovalApiService;
import com.gic.marketing.process.api.service.sms.SmsSendApiService;
......@@ -144,7 +143,7 @@ public class OfflineStrategy implements PayStrategy {
public ServiceResponse<Void> callBack(ApprovalCallBackDTO resData) {
logger.info("银行线下支付回调结果:{}", JSON.toJSONString(resData));
sendApprovalSms(resData);
String orderSerialNumber = resData.getOrderSerialNumber();
TabBillingPayInfo billingPayInfo = billingPayInfoService.getByOrderSerialNumber(orderSerialNumber, PayTypeEnum.OFFLINE_PAY.getCode());
......@@ -155,13 +154,14 @@ public class OfflineStrategy implements PayStrategy {
switch (resData.getBuyType()) {
case 1:
// 商户余额充值
billingRechargeRecordService.updateBySerialNumber(billingPayInfo.getEnterpriseId(), resData.getOrderSerialNumber(), resData.getTotalFee(), resData.getTotalFeePaid(), resData.getAuditStatus(), resData.getTimeEnd());
billingRechargeRecordService.updateBySerialNumber(billingPayInfo.getEnterpriseId(), resData.getOrderSerialNumber(), resData.getTotalFee(), resData.getTotalFeePaid(), resData.getAuditStatus(), resData.getTimeEnd(), null);
sendRechargeSuccessSms(resData, billingPayInfo.getEnterpriseId());
sendApprovalSms(resData, "GICJFZX007");
break;
case 2:
// 短信套餐包购买
this.billingOrderService.updateBySerialNumber(resData.getOrderSerialNumber(), resData.getTotalFeePaid(), resData.getAuditStatus(), resData.getTimeEnd());
sendApprovalSms(resData, "GICJFZX008");
break;
default:
break;
......@@ -177,11 +177,11 @@ public class OfflineStrategy implements PayStrategy {
sendSms(resData, userDTO, "GICJFZX005");
}
private void sendApprovalSms(ApprovalCallBackDTO resData) {
private void sendApprovalSms(ApprovalCallBackDTO resData, String code) {
TabBillingRechargeRecord rechargeRecord = billingRechargeRecordService.getRechargeRecordBySerialNumber(resData.getOrderSerialNumber());
Integer initiator = rechargeRecord.getInitiator();
UserDTO userDTO = userApiService.getUserById(initiator).getResult();
sendSms(resData, userDTO, "GICJFZX008");
sendSms(resData, userDTO, code);
}
private void sendSms(ApprovalCallBackDTO resData, UserDTO userDTO, String code) {
......@@ -207,7 +207,13 @@ public class OfflineStrategy implements PayStrategy {
approvalDTO.setOrderNumber(outPayDTO.getOrderSerialNumber());
// gic
approvalDTO.setPlatformType(1);
approvalDTO.setInitiatorType(InitiatorTypeEnum.ENTERPRISE.getCode());
if (outPayDTO.getInitiatorUser() != null) {
UserDTO userDTO = userApiService.getUserById(outPayDTO.getInitiatorUser()).getResult();
if (userDTO != null) {
approvalDTO.setInitiatorType(userDTO.getLoginType() == 0 ?
BillingInitiatorTypeEnum.ENTERPRISE.getCode() : BillingInitiatorTypeEnum.OPERATION.getCode());
}
}
approvalDTO.setInitiatorName(outPayDTO.getInitiatorName());
approvalDTO.setPlannedAmount(outPayDTO.getTotalFee());
approvalDTO.setVerifyCode(outPayDTO.getAuthCode());
......
......@@ -118,7 +118,7 @@ public class WxPayStrategy implements PayStrategy {
switch (billingPayInfo.getBuyType()) {
case 1:
// 商户余额充值
billingRechargeRecordService.updateBySerialNumber(resData.getEnterpriseId(), billingPayInfo.getOrderSerialNumber(), resData.getTotalFeePaid(), resData.getTotalFeePaid(), BillingAuditStatusEnum.PASS.getCode(), resData.getTimeEnd());
billingRechargeRecordService.updateBySerialNumber(resData.getEnterpriseId(), billingPayInfo.getOrderSerialNumber(), resData.getTotalFeePaid(), resData.getTotalFeePaid(), BillingAuditStatusEnum.PASS.getCode(), resData.getTimeEnd(), resData.getOnlineSerialNumber());
this.pushMessageApiService.pushMessage(resData.getEnterpriseId(), "系统通知", "余额充值", "您的商户成功充值"+resData.getTotalFeePaid()+"元!感谢您的支持和使用!");
sendRechargeSuccessSms(resData, billingPayInfo.getEnterpriseId());
break;
......
......@@ -5,6 +5,7 @@
<id column="recharge_record_id" jdbcType="INTEGER" property="rechargeRecordId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber" />
<result column="online_serial_number" jdbcType="VARCHAR" property="onlineSerialNumber" />
<result column="total_fee" jdbcType="DOUBLE" property="totalFee" />
<result column="total_fee_paid" jdbcType="DOUBLE" property="totalFeePaid" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
......@@ -20,9 +21,9 @@
<result column="deduction_time" jdbcType="TIMESTAMP" property="deductionTime" />
</resultMap>
<sql id="Base_Column_List">
recharge_record_id, enterprise_id, serial_number, total_fee, total_fee_paid, pay_type,
pay_info_id, status, initiator, initiator_user, initiator_name, audit_status, verification_code,
create_time, update_time, deduction_time
recharge_record_id, enterprise_id, serial_number, online_serial_number, total_fee,
total_fee_paid, pay_type, pay_info_id, status, initiator, initiator_user, initiator_name,
audit_status, verification_code, create_time, update_time, deduction_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -36,17 +37,17 @@
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabBillingRechargeRecord">
insert into tab_billing_recharge_record (recharge_record_id, enterprise_id, serial_number,
total_fee, total_fee_paid, pay_type,
pay_info_id, status, initiator,
initiator_user, initiator_name, audit_status,
verification_code, create_time, update_time,
deduction_time)
online_serial_number, total_fee, total_fee_paid,
pay_type, pay_info_id, status,
initiator, initiator_user, initiator_name,
audit_status, verification_code, create_time,
update_time, deduction_time)
values (#{rechargeRecordId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
#{totalFee,jdbcType=DOUBLE}, #{totalFeePaid,jdbcType=DOUBLE}, #{payType,jdbcType=INTEGER},
#{payInfoId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{initiator,jdbcType=INTEGER},
#{initiatorUser,jdbcType=INTEGER}, #{initiatorName,jdbcType=VARCHAR}, #{auditStatus,jdbcType=INTEGER},
#{verificationCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{deductionTime,jdbcType=TIMESTAMP})
#{onlineSerialNumber,jdbcType=VARCHAR}, #{totalFee,jdbcType=DOUBLE}, #{totalFeePaid,jdbcType=DOUBLE},
#{payType,jdbcType=INTEGER}, #{payInfoId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{initiator,jdbcType=INTEGER}, #{initiatorUser,jdbcType=INTEGER}, #{initiatorName,jdbcType=VARCHAR},
#{auditStatus,jdbcType=INTEGER}, #{verificationCode,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{deductionTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabBillingRechargeRecord">
insert into tab_billing_recharge_record
......@@ -60,6 +61,9 @@
<if test="serialNumber != null">
serial_number,
</if>
<if test="onlineSerialNumber != null">
online_serial_number,
</if>
<if test="totalFee != null">
total_fee,
</if>
......@@ -110,6 +114,9 @@
<if test="serialNumber != null">
#{serialNumber,jdbcType=VARCHAR},
</if>
<if test="onlineSerialNumber != null">
#{onlineSerialNumber,jdbcType=VARCHAR},
</if>
<if test="totalFee != null">
#{totalFee,jdbcType=DOUBLE},
</if>
......@@ -160,6 +167,9 @@
<if test="serialNumber != null">
serial_number = #{serialNumber,jdbcType=VARCHAR},
</if>
<if test="onlineSerialNumber != null">
online_serial_number = #{onlineSerialNumber,jdbcType=VARCHAR},
</if>
<if test="totalFee != null">
total_fee = #{totalFee,jdbcType=DOUBLE},
</if>
......@@ -206,6 +216,7 @@
update tab_billing_recharge_record
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
serial_number = #{serialNumber,jdbcType=VARCHAR},
online_serial_number = #{onlineSerialNumber,jdbcType=VARCHAR},
total_fee = #{totalFee,jdbcType=DOUBLE},
total_fee_paid = #{totalFeePaid,jdbcType=DOUBLE},
pay_type = #{payType,jdbcType=INTEGER},
......@@ -253,7 +264,8 @@
update tab_billing_recharge_record
set total_fee_paid = #{totalFeePaid},
audit_status = #{auditStatus},
deduction_time = #{timeEnd}
deduction_time = #{timeEnd},
online_serial_number = #{onlineSerialNumber}
where serial_number = #{orderSerialNumber}
</update>
<select id="getAuditingRechargeRecord" resultMap="BaseResultMap">
......
......@@ -102,8 +102,14 @@ public class BillingPayInfoController {
ServiceResponse<List<TransferAccountsApprovalDTO>> approvalResponse = transferAccountsApprovalApiService
.listByOrderSerialNumber(orderSerialNumberList);
if (approvalResponse.isSuccess()) {
badMoneyMap = approvalResponse.getResult().stream().filter(e -> e.getApprovalStatus() == TransferAccountApprovalStatusEnum.AGREE.getCode())
.collect(Collectors.toMap(e -> e.getOrderNumber(), e -> e.getBadAmount(), (oldValue,newValue) -> newValue));
List<TransferAccountsApprovalDTO> transferAccountsApprovalDTOS = approvalResponse.getResult();
if (CollectionUtils.isNotEmpty(transferAccountsApprovalDTOS)) {
badMoneyMap = transferAccountsApprovalDTOS.
stream().filter(e -> e.getApprovalStatus() == TransferAccountApprovalStatusEnum.AGREE.getCode())
.collect(Collectors.toMap(e -> e.getOrderNumber(), e -> e.getBadAmount(), (oldValue, newValue) -> newValue));
} else {
badMoneyMap = new HashMap<>(2);
}
} else {
badMoneyMap = new HashMap<>(2);
}
......
......@@ -52,7 +52,8 @@ public class BillingRechargeController {
BillingRechargeDTO billingRechargeDTO = EntityUtil.changeEntityByOrika(BillingRechargeDTO.class, billingRechargeQO);
UserDetail userDetail = UserDetailUtils.getUserDetail();
billingRechargeDTO.setEnterpriseId(userDetail.getEnterpriseId());
billingRechargeDTO.setInitiator(BillingInitiatorTypeEnum.ENTERPRISE.getCode());
billingRechargeDTO.setInitiator(UserDetailUtils.getUserDetail().getUserInfo().getLoginType() == 0 ?
BillingInitiatorTypeEnum.ENTERPRISE.getCode() : BillingInitiatorTypeEnum.OPERATION.getCode());
billingRechargeDTO.setInitiatorUser(userDetail.getUserId());
billingRechargeDTO.setInitiatorName(userDetail.getUserInfo().getUserName());
ServiceResponse<Map<String, Object>> serviceResponse = billingRechargeApiService.saveAndSelectPaymentMethod(billingRechargeDTO);
......@@ -68,7 +69,8 @@ public class BillingRechargeController {
BillingRechargeDTO billingRechargeDTO = EntityUtil.changeEntityByOrika(BillingRechargeDTO.class, billingRechargeQO);
UserDetail userDetail = UserDetailUtils.getUserDetail();
billingRechargeDTO.setEnterpriseId(userDetail.getEnterpriseId());
billingRechargeDTO.setInitiator(BillingInitiatorTypeEnum.ENTERPRISE.getCode());
billingRechargeDTO.setInitiator(UserDetailUtils.getUserDetail().getUserInfo().getLoginType() == 0 ?
BillingInitiatorTypeEnum.ENTERPRISE.getCode() : BillingInitiatorTypeEnum.OPERATION.getCode());
billingRechargeDTO.setInitiatorUser(userDetail.getUserId());
billingRechargeDTO.setInitiatorName(userDetail.getUserInfo().getUserName());
ServiceResponse<Integer> serviceResponse = billingRechargeApiService.confirmPay(billingRechargeDTO);
......
package com.gic.enterprise.web.controller.wm;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.gic.enterprise.error.ErrorCode;
import com.gic.weimob.api.service.WeimobBaseService;
import com.gic.weimob.api.service.WeimobMemberService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.ServiceResponse;
......@@ -50,11 +47,13 @@ public class WmMallStoreController {
@Autowired
private MemberCardApiService memberCardApiService;
@Autowired
private WeimobStoreSiteService weimobStoreSiteService;
@Autowired
private WeimobMerchantService weimobMerchantService;
@Autowired
private MemberCouponApiService memberCouponApiService;
@Autowired
private WeimobMemberService weimobMemberService;
@Autowired
private WeimobBaseService weimobBaseService;
@RequestMapping("/save-wm-store")
public RestResponse save(WmStoreDTO dto) {
......@@ -171,7 +170,7 @@ public class WmMallStoreController {
}
/**
* 获取会员卡已同步接口
* 获取会员卡等级已同步接口
* @Title: listMemberGrade

* @Description:

* @author guojuxing
......@@ -184,6 +183,67 @@ public class WmMallStoreController {
}
/**
* 卡券错误日志列表
* @param gicCouponId
* @param sendType 非必填,null时取全部,1 为推送卡券,2 核销卡券
* @param currentPage
* @param pageSize
* @param searchStr
* @return
*/
@RequestMapping("/list-coupon-log")
public RestResponse listCouponLog(String gicCouponId, Integer sendType,
@RequestParam(defaultValue = "1") int currentPage,
@RequestParam(defaultValue = "20") int pageSize, String searchStr) {
return ResultControllerUtils.commonResult(weimobMerchantService
.getCouponLogs(Long.valueOf(gicCouponId), sendType, currentPage, pageSize, searchStr), WeimobCouponErLogVO.class);
}
/**
* 删除卡券错误日志
* @param couponErLogIds 卡券错误日志ID,英文逗号给开
* @return
*/
@RequestMapping("delete-coupon-error-log")
public RestResponse deleteCouponErrorLog(String couponErLogIds) {
String[] ids = couponErLogIds.split(",");
List<Long> result = new ArrayList<>(ids.length);
for (String id : ids) {
result.add(Long.valueOf(id));
}
return ResultControllerUtils.commonResult(weimobMerchantService.deleteCouponErrorlog(result));
}
/**
* 重新发送卡券
* @param mcuId
* @param couponId
* @param couponCode
* @param couponLogId
* @return
*/
@RequestMapping("send-coupon-reset")
public RestResponse sendCouponReset(String mcuId, String couponId, String couponCode, String couponLogId) {
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
return ResultControllerUtils.commonResult(weimobMemberService.sendCoupon(enterpriseId, Long.valueOf(mcuId),
Long.valueOf(couponId), Long.valueOf(couponLogId), couponCode));
}
/**
* 核销卡券
* @param mcuId
* @param couponCode
* @param couponLogId
* @return
*/
@RequestMapping("consume-coupon")
public RestResponse consumeCoupon(String mcuId, String couponCode, String couponLogId) {
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
return ResultControllerUtils.commonResult(weimobMemberService.consumeCoupon(enterpriseId, Long.valueOf(mcuId),
Long.valueOf(couponLogId), couponCode));
}
/**
* 获取微盟卡券列表
* @Title: listWmCoupon

* @Description:
......@@ -201,6 +261,22 @@ public class WmMallStoreController {
return RestResponse.failure(wmStoreResponse.getCode(), wmStoreResponse.getMessage());
}
/**
* 查询已经配置的会员卡
* @param wmMallStoreId
* @return
*/
@RequestMapping("/get-has-config-member-card")
public RestResponse getHasConfigMemberCard(Integer wmMallStoreId) {
return ResultControllerUtils.commonResult(weimobMerchantService.getMcuAreaId(wmMallStoreId));
}
/**
* gic卡券列表
* @param wmMallStoreId
* @param cardName
* @return
*/
@RequestMapping("/list-gic-coupon")
public RestResponse listGicCoupon(Integer wmMallStoreId, String cardName) {
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
......@@ -318,12 +394,28 @@ public class WmMallStoreController {
"微盟商城");
}
/**
* 获取店铺配置
* @param wmMallStoreId
* @param wmStoreConfigType
* @return
*/
@RequestMapping("/get-wm-store-config")
public RestResponse getWmStoreConfig(Integer wmMallStoreId, Integer wmStoreConfigType) {
return ResultControllerUtils
.commonResult(wmStoreApiService.getWmStoreConfig(wmMallStoreId, wmStoreConfigType));
}
@RequestMapping("/get-wm-token")
public RestResponse getWmToken(String pid) {
return RestResponse.success(weimobBaseService.getWmStoreByPid(Long.valueOf(pid)));
}
/**
* 绑定gic卡券和微盟卡券
* @param dto
* @return
*/
@RequestMapping("/bind-coupon")
public RestResponse bindCoupon(WmStoreCouponConfigDTO dto) {
dto.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
......@@ -344,6 +436,11 @@ public class WmMallStoreController {
"微盟商城");
}
/**
* gic卡券关联微盟卡券列表
* @param params
* @return
*/
@RequestMapping("/page-coupon-config")
public RestResponse pageCouponConfig(CouponConfigQO params) {
return ResultControllerUtils
......
package com.gic.enterprise.web.vo.wm;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
public class WeimobCouponErLogVO implements Serializable{
private static final long serialVersionUID = 5523945209221656292L;
/**
* 日志主键
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long couponErLogId;
/**
* 1 : 发送卡券 --- 2 :核销卡券
*/
private Integer sendType;
/**
* 企业id
*/
private Integer enterpriseId;
/**
*
*/
private Integer wmMallStoreId;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long pid;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long mcuAreaId;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long mcuId;
/**
*
*/
private Integer wid;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long gicCouponLogId;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long gicCouponTempId;
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long wmCouponTempId;
/**
*
*/
private String couponCode;
/**
*
*/
private String wmParam;
/**
*
*/
private String wmResponse;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*
*/
private Integer status;
public Long getCouponErLogId() {
return couponErLogId;
}
public WeimobCouponErLogVO setCouponErLogId(Long couponErLogId) {
this.couponErLogId = couponErLogId;
return this;
}
public Integer getSendType() {
return sendType;
}
public WeimobCouponErLogVO setSendType(Integer sendType) {
this.sendType = sendType;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public WeimobCouponErLogVO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public Integer getWmMallStoreId() {
return wmMallStoreId;
}
public WeimobCouponErLogVO setWmMallStoreId(Integer wmMallStoreId) {
this.wmMallStoreId = wmMallStoreId;
return this;
}
public Long getPid() {
return pid;
}
public WeimobCouponErLogVO setPid(Long pid) {
this.pid = pid;
return this;
}
public Long getMcuAreaId() {
return mcuAreaId;
}
public WeimobCouponErLogVO setMcuAreaId(Long mcuAreaId) {
this.mcuAreaId = mcuAreaId;
return this;
}
public Long getMcuId() {
return mcuId;
}
public WeimobCouponErLogVO setMcuId(Long mcuId) {
this.mcuId = mcuId;
return this;
}
public Integer getWid() {
return wid;
}
public WeimobCouponErLogVO setWid(Integer wid) {
this.wid = wid;
return this;
}
public Long getGicCouponLogId() {
return gicCouponLogId;
}
public WeimobCouponErLogVO setGicCouponLogId(Long gicCouponLogId) {
this.gicCouponLogId = gicCouponLogId;
return this;
}
public Long getGicCouponTempId() {
return gicCouponTempId;
}
public WeimobCouponErLogVO setGicCouponTempId(Long gicCouponTempId) {
this.gicCouponTempId = gicCouponTempId;
return this;
}
public Long getWmCouponTempId() {
return wmCouponTempId;
}
public WeimobCouponErLogVO setWmCouponTempId(Long wmCouponTempId) {
this.wmCouponTempId = wmCouponTempId;
return this;
}
public String getCouponCode() {
return couponCode;
}
public WeimobCouponErLogVO setCouponCode(String couponCode) {
this.couponCode = couponCode;
return this;
}
public String getWmParam() {
return wmParam;
}
public WeimobCouponErLogVO setWmParam(String wmParam) {
this.wmParam = wmParam;
return this;
}
public String getWmResponse() {
return wmResponse;
}
public WeimobCouponErLogVO setWmResponse(String wmResponse) {
this.wmResponse = wmResponse;
return this;
}
public Date getCreateTime() {
return createTime;
}
public WeimobCouponErLogVO setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public WeimobCouponErLogVO setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
public Integer getStatus() {
return status;
}
public WeimobCouponErLogVO setStatus(Integer status) {
this.status = status;
return this;
}
}
......@@ -11,16 +11,26 @@ public class WeimobStoreClerkLogVO implements Serializable{
/**
* 日志主键
*/
private String id;
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long id;
/**
* 企业id
*/
private String enterpriseId;
private Integer enterpriseId;
/**
* 微盟商户id
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long pid;
/**
*
*/
private Integer storeInfoId;
/**
*
*/
private Integer clerkId;
/**
* 门店编码
*/
......@@ -67,20 +77,20 @@ public class WeimobStoreClerkLogVO implements Serializable{
*/
private Integer status;
public String getId() {
public Long getId() {
return id;
}
public WeimobStoreClerkLogVO setId(String id) {
public WeimobStoreClerkLogVO setId(Long id) {
this.id = id;
return this;
}
public String getEnterpriseId() {
public Integer getEnterpriseId() {
return enterpriseId;
}
public WeimobStoreClerkLogVO setEnterpriseId(String enterpriseId) {
public WeimobStoreClerkLogVO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
......@@ -94,6 +104,24 @@ public class WeimobStoreClerkLogVO implements Serializable{
return this;
}
public Integer getStoreInfoId() {
return storeInfoId;
}
public WeimobStoreClerkLogVO setStoreInfoId(Integer storeInfoId) {
this.storeInfoId = storeInfoId;
return this;
}
public Integer getClerkId() {
return clerkId;
}
public WeimobStoreClerkLogVO setClerkId(Integer clerkId) {
this.clerkId = clerkId;
return this;
}
public String getStoreCode() {
return storeCode;
}
......
package com.gic.enterprise.web.vo.wm;
import java.io.Serializable;
import java.util.Date;
public class WmBranchVO implements Serializable{
private static final long serialVersionUID = 2272635530786898016L;
private Integer storeInfoId;
private String storeCode;
private Date time;
private String storeName;
public Integer getStoreInfoId() {
return storeInfoId;
}
public WmBranchVO setStoreInfoId(Integer storeInfoId) {
this.storeInfoId = storeInfoId;
return this;
}
public String getStoreCode() {
return storeCode;
}
public WmBranchVO setStoreCode(String storeCode) {
this.storeCode = storeCode;
return this;
}
public Date getTime() {
return time;
}
public WmBranchVO setTime(Date time) {
this.time = time;
return this;
}
public String getStoreName() {
return storeName;
}
public WmBranchVO setStoreName(String storeName) {
this.storeName = storeName;
return this;
}
}
......@@ -128,6 +128,8 @@
<dubbo:reference interface="com.gic.weimob.api.service.WeimobStoreSiteService" id="weimobStoreSiteService" timeout="6000"/>
<dubbo:reference interface="com.gic.weimob.api.service.WeimobMerchantService" id="weimobMerchantService" timeout="6000"/>
<dubbo:reference interface="com.gic.weimob.api.service.WeimobMemberService" id="weimobMemberService" timeout="6000"/>
<dubbo:reference interface="com.gic.weimob.api.service.WeimobBaseService" id="weimobBaseService" timeout="6000"/>
<dubbo:reference interface="com.gic.marketing.api.service.coupon.MemberCouponApiService" id="memberCouponApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.store.service.ClerkApiService" id="clerkApiService" timeout="60000" />
......
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