提交代码

yy_dev
胡锐 2 years ago
parent 0a7e1a7eb4
commit 5a715dcb9f
  1. 118
      cweb/src/main/java/com/cweb/controller/BsBankActivityController.java
  2. 5
      cweb/src/main/java/com/cweb/controller/BsTradeOrderController.java
  3. 47
      cweb/src/main/java/com/cweb/controller/TestController.java
  4. 47
      service/src/main/java/com/hfkj/dao/BsBankActivityRosterRateMapper.java
  5. 22
      service/src/main/java/com/hfkj/dao/BsBankActivityRosterRateSqlProvider.java
  6. 7
      service/src/main/java/com/hfkj/dao/BsTradeOrderMapperExt.java
  7. 13
      service/src/main/java/com/hfkj/entity/BsBankActivityRoster.java
  8. 37
      service/src/main/java/com/hfkj/entity/BsBankActivityRosterRate.java
  9. 80
      service/src/main/java/com/hfkj/entity/BsBankActivityRosterRateExample.java
  10. 42
      service/src/main/java/com/hfkj/service/BsBankActivityRosterRateService.java
  11. 50
      service/src/main/java/com/hfkj/service/BsBankActivityRosterService.java
  12. 2
      service/src/main/java/com/hfkj/service/BsTradeOrderService.java
  13. 74
      service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterRateServiceImpl.java
  14. 155
      service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java
  15. 5
      service/src/main/java/com/hfkj/service/impl/BsBankActivityServiceImpl.java
  16. 18
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java
  17. 50
      service/src/main/resources/dev/commonConfig.properties

@ -12,9 +12,13 @@ import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsAudit;
import com.hfkj.entity.BsBankActivity;
import com.hfkj.entity.BsBankActivityRoster;
import com.hfkj.entity.BsBankActivityRosterRate;
import com.hfkj.model.ResponseData;
import com.hfkj.model.UserInfoModel;
import com.hfkj.service.BsAuditService;
import com.hfkj.service.BsBankActivityRosterRateService;
import com.hfkj.service.BsBankActivityRosterService;
import com.hfkj.service.BsBankActivityService;
import com.hfkj.sysenum.AuditStatusEnum;
import com.hfkj.sysenum.SecUserTypeEnum;
@ -27,6 +31,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -46,6 +51,10 @@ public class BsBankActivityController {
private SaasActivityService saasActivityService;
@Resource
private BsBankActivityService bankActivityService;
@Resource
private BsBankActivityRosterService bsBankActivityRosterService;
@Resource
private BsBankActivityRosterRateService bankActivityRosterRateService;
@RequestMapping(value="/refreshActivityList",method = RequestMethod.POST)
@ResponseBody
@ -82,21 +91,16 @@ public class BsBankActivityController {
}
@RequestMapping(value="/queryActivityList",method = RequestMethod.POST)
@RequestMapping(value="/queryActivityList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取活动列表")
public ResponseData queryActivityList(@RequestParam(value = "merId" , required = true) Long merId) {
try {
Map<String, Object> param = new HashMap<>();
param.put("", "");
param.put("", "");
param.put("", "");
List<BsBankActivity> activityList = bankActivityService.getBankActivityList(param);
/* for (BsBankActivity bankActivity : activityList) {
bankActivity.setBankActivityRoster();
}*/
List<BsBankActivity> activityList = bankActivityService.getBankActivityList(new HashMap<>());
for (BsBankActivity bankActivity : activityList) {
bankActivity.setBankActivityRoster(bsBankActivityRosterService.getActivityRoster(bankActivity.getId(), merId));
}
return ResponseMsgUtil.success(activityList);
} catch (Exception e) {
@ -105,4 +109,98 @@ public class BsBankActivityController {
}
}
@RequestMapping(value="/queryActivityDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取活动详情")
public ResponseData queryActivityDetail(@RequestParam(value = "bankActivityId" , required = true) Long bankActivityId,
@RequestParam(value = "merId" , required = true) Long merId) {
try {
BsBankActivity bankActivity = bankActivityService.getBankActivityById(bankActivityId);
if (bankActivity != null) {
bankActivity.setBankActivityRoster(bsBankActivityRosterService.getActivityRoster(bankActivityId, merId));
}
return ResponseMsgUtil.success(bankActivity);
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/enrollActivity",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "报名活动")
public ResponseData enrollActivity(@RequestBody JSONObject body) {
try {
if (body == null || body.getLong("bankActivityId") == null || body.getLong("merId") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
bsBankActivityRosterService.enrollActivity(body.getLong("bankActivityId"),body.getLong("merId"));
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/configRosterRate",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "配置费率")
public ResponseData configRosterRate(@RequestBody JSONObject body) {
try {
if (body == null
|| body.getLong("bankActivityId") == null
|| body.getLong("merId") == null
|| body.getJSONArray("rateList") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
List<BsBankActivityRosterRate> bankActivityRosterRateList = new ArrayList<>();
for (Object obj : body.getJSONArray("rateList")) {
JSONObject rate = (JSONObject) obj;
if (rate.getLong("rateId") == null || rate.getBigDecimal("preferentialRates") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
BsBankActivityRosterRate activityRosterRate = bankActivityRosterRateService.getRosterRateById(rate.getLong("rateId"));
if (activityRosterRate == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
activityRosterRate.setPreferentialRates(rate.getBigDecimal("preferentialRates").toString());
bankActivityRosterRateList.add(activityRosterRate);
}
bsBankActivityRosterService.configRosterRate(body.getLong("bankActivityId"), body.getLong("merId"), bankActivityRosterRateList);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getRosterRateList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询费率")
public ResponseData getRosterRateList(@RequestParam(value = "bankActivityId" , required = true) Long bankActivityId,
@RequestParam(value = "merId" , required = true) Long merId) {
try {
return ResponseMsgUtil.success(bankActivityRosterRateService.getListByMerId(bankActivityId, merId));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -416,7 +416,10 @@ public class BsTradeOrderController {
param.put("status", status);
Map<String, Object> map = new HashMap<>();
map.put("totalPrice", tradeOrderService.countTradeOrderPrice(param));
Map<String, Object> tradeOrderPrice = tradeOrderService.countTradeOrderPrice(param);
map.put("totalPrice", tradeOrderPrice.get("tradePrice"));
map.put("totalNum", tradeOrderPrice.get("count"));
PageHelper.startPage(pageNum,pageSize);
map.put("pageInfo", new PageInfo<>(tradeOrderService.getTradeOrderList(param)));

@ -117,6 +117,8 @@ public class TestController {
private BsMerPlatformTermService merPlatformTermService;
@Resource
private BsStoreService storeService;
@Resource
private BsBankActivityRosterRateService bankActivityRosterRateService;
@RequestMapping(value="/refreshMerStatus",method = RequestMethod.GET)
@ResponseBody
@ -349,6 +351,7 @@ public class TestController {
bankActivity.setRegistrationEnd(activity.getDate("registrationEnd"));
bankActivity.setDetails(activity.getString("details"));
bankActivity.setComments(activity.getString("comments"));
bankActivity.setStatus(1);
bankActivityService.editData(bankActivity);
}
return ResponseMsgUtil.success(null);
@ -449,18 +452,17 @@ public class TestController {
// return ResponseMsgUtil.success(saasActivityService.queryCustomerActivityStatus("73", "8226900445800HB"));
/*********** 活动报名 *************/
/*
List<String> externalCustomerNos = new ArrayList<>();
externalCustomerNos.add("8226900899900CS");
/* List<String> externalCustomerNos = new ArrayList<>();
externalCustomerNos.add("8226900549903LG");
externalCustomerNos.add("8226900445800HQ");
return ResponseMsgUtil.success(saasActivityService.customerRegisterActivity("73", null, externalCustomerNos));
*/
/******* 配置活动费率 *******/
String activityId = "73";
String externalCustomerNo = code;
JSONArray jsonArray = saasActivityService.queryCustomerRates(activityId, externalCustomerNo);
return ResponseMsgUtil.success(jsonArray);
/*Map<String, Object> rate;
return ResponseMsgUtil.success(jsonArray);
/* Map<String, Object> rate;
List<Map<String,Object>> rates = new ArrayList<>();
for (Object obj : jsonArray) {
@ -470,8 +472,39 @@ public class TestController {
rate.put("discountedRates", "0.0025");
rates.add(rate);
}
return ResponseMsgUtil.success(saasActivityService.customerRatesUpdate(activityId,externalCustomerNo, rates));*/
return ResponseMsgUtil.success(saasActivityService.customerRatesUpdate(activityId,externalCustomerNo, rates));
*/
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/saasActivity1",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "saasActivity1")
public ResponseData saasActivity1(@RequestParam(value = "code", required = false) String code) {
try {
String str = "[{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-05-15 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93985,\"current\":true,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":884,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-05-31 23:59:59\",\"order\":1},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-06-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93986,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":885,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-06-30 23:59:59\",\"order\":2},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-07-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93987,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":886,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-07-31 23:59:59\",\"order\":3},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-08-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93988,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":887,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-08-31 23:59:59\",\"order\":4},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-09-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93989,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":888,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-09-30 23:59:59\",\"order\":5},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-10-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93990,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":889,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-10-31 23:59:59\",\"order\":6},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-11-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93991,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":890,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-11-30 23:59:59\",\"order\":7},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2023-12-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93992,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":891,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2023-12-31 23:59:59\",\"order\":8},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2024-01-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93993,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":892,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2024-01-31 23:59:59\",\"order\":9},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2024-02-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93994,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":893,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2024-02-29 23:59:59\",\"order\":10},{\"ratesStatus\":\"NOT\",\"rates\":[0.0025],\"start\":\"2024-03-01 00:00:00\",\"preferentialTypes\":[\"WXPAY\",\"ALIPAY\"],\"configModel\":\"SPECIFIED\",\"type\":24,\"quotaLimit\":100000.0,\"timeBundleNo\":93995,\"current\":false,\"preferentialModel\":\"QUOTA\",\"welfareRatesId\":894,\"ratesModel\":\"DISCOUNTED\",\"end\":\"2024-03-31 23:59:59\",\"order\":11}]";
JSONArray array = JSONArray.parseArray(str);
for (Object obj : array) {
JSONObject rate = (JSONObject) obj;
BsBankActivityRosterRate rosterRate = new BsBankActivityRosterRate();
rosterRate.setBankActivityId(57L);
rosterRate.setBankActivityRosterId(0L);
rosterRate.setMerId(57L);
rosterRate.setPlatformNo("100112200");
rosterRate.setCupNo("822290058120KK2");
rosterRate.setWelfareRatesId(rate.getLong("welfareRatesId"));
rosterRate.setStartTime(rate.getDate("start"));
rosterRate.setEndTime(rate.getDate("end"));
rosterRate.setRates(rate.getString("rates"));
rosterRate.setStatus(2);
bankActivityRosterRateService.editData(rosterRate);
}
return ResponseMsgUtil.success(null);
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);

@ -39,22 +39,22 @@ public interface BsBankActivityRosterRateMapper extends BsBankActivityRosterRate
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_bank_activity_roster_rate (bank_activity_id, mer_id, ",
"platform_no, cup_no, ",
"welfare_rates_id, preferential_model, ",
"start_time, end_time, ",
"rates, preferential_rates, ",
"`status`, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{bankActivityId,jdbcType=BIGINT}, #{merId,jdbcType=BIGINT}, ",
"#{platformNo,jdbcType=VARCHAR}, #{cupNo,jdbcType=VARCHAR}, ",
"#{welfareRatesId,jdbcType=INTEGER}, #{preferentialModel,jdbcType=INTEGER}, ",
"#{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, ",
"#{rates,jdbcType=VARCHAR}, #{preferentialRates,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"insert into bs_bank_activity_roster_rate (bank_activity_id, bank_activity_roster_id, ",
"mer_id, platform_no, ",
"cup_no, welfare_rates_id, ",
"preferential_model, start_time, ",
"end_time, rates, ",
"preferential_rates, `status`, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{bankActivityId,jdbcType=BIGINT}, #{bankActivityRosterId,jdbcType=BIGINT}, ",
"#{merId,jdbcType=BIGINT}, #{platformNo,jdbcType=VARCHAR}, ",
"#{cupNo,jdbcType=VARCHAR}, #{welfareRatesId,jdbcType=BIGINT}, ",
"#{preferentialModel,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, ",
"#{endTime,jdbcType=TIMESTAMP}, #{rates,jdbcType=VARCHAR}, ",
"#{preferentialRates,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsBankActivityRosterRate record);
@ -67,10 +67,11 @@ public interface BsBankActivityRosterRateMapper extends BsBankActivityRosterRate
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="bank_activity_id", property="bankActivityId", jdbcType=JdbcType.BIGINT),
@Result(column="bank_activity_roster_id", property="bankActivityRosterId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR),
@Result(column="welfare_rates_id", property="welfareRatesId", jdbcType=JdbcType.INTEGER),
@Result(column="welfare_rates_id", property="welfareRatesId", jdbcType=JdbcType.BIGINT),
@Result(column="preferential_model", property="preferentialModel", jdbcType=JdbcType.INTEGER),
@Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
@ -87,19 +88,20 @@ public interface BsBankActivityRosterRateMapper extends BsBankActivityRosterRate
@Select({
"select",
"id, bank_activity_id, mer_id, platform_no, cup_no, welfare_rates_id, preferential_model, ",
"start_time, end_time, rates, preferential_rates, `status`, create_time, update_time, ",
"ext_1, ext_2, ext_3",
"id, bank_activity_id, bank_activity_roster_id, mer_id, platform_no, cup_no, ",
"welfare_rates_id, preferential_model, start_time, end_time, rates, preferential_rates, ",
"`status`, create_time, update_time, ext_1, ext_2, ext_3",
"from bs_bank_activity_roster_rate",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="bank_activity_id", property="bankActivityId", jdbcType=JdbcType.BIGINT),
@Result(column="bank_activity_roster_id", property="bankActivityRosterId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR),
@Result(column="welfare_rates_id", property="welfareRatesId", jdbcType=JdbcType.INTEGER),
@Result(column="welfare_rates_id", property="welfareRatesId", jdbcType=JdbcType.BIGINT),
@Result(column="preferential_model", property="preferentialModel", jdbcType=JdbcType.INTEGER),
@Result(column="start_time", property="startTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="end_time", property="endTime", jdbcType=JdbcType.TIMESTAMP),
@ -126,10 +128,11 @@ public interface BsBankActivityRosterRateMapper extends BsBankActivityRosterRate
@Update({
"update bs_bank_activity_roster_rate",
"set bank_activity_id = #{bankActivityId,jdbcType=BIGINT},",
"bank_activity_roster_id = #{bankActivityRosterId,jdbcType=BIGINT},",
"mer_id = #{merId,jdbcType=BIGINT},",
"platform_no = #{platformNo,jdbcType=VARCHAR},",
"cup_no = #{cupNo,jdbcType=VARCHAR},",
"welfare_rates_id = #{welfareRatesId,jdbcType=INTEGER},",
"welfare_rates_id = #{welfareRatesId,jdbcType=BIGINT},",
"preferential_model = #{preferentialModel,jdbcType=INTEGER},",
"start_time = #{startTime,jdbcType=TIMESTAMP},",
"end_time = #{endTime,jdbcType=TIMESTAMP},",

@ -32,6 +32,10 @@ public class BsBankActivityRosterRateSqlProvider {
sql.VALUES("bank_activity_id", "#{bankActivityId,jdbcType=BIGINT}");
}
if (record.getBankActivityRosterId() != null) {
sql.VALUES("bank_activity_roster_id", "#{bankActivityRosterId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
@ -45,7 +49,7 @@ public class BsBankActivityRosterRateSqlProvider {
}
if (record.getWelfareRatesId() != null) {
sql.VALUES("welfare_rates_id", "#{welfareRatesId,jdbcType=INTEGER}");
sql.VALUES("welfare_rates_id", "#{welfareRatesId,jdbcType=BIGINT}");
}
if (record.getPreferentialModel() != null) {
@ -103,6 +107,7 @@ public class BsBankActivityRosterRateSqlProvider {
sql.SELECT("id");
}
sql.SELECT("bank_activity_id");
sql.SELECT("bank_activity_roster_id");
sql.SELECT("mer_id");
sql.SELECT("platform_no");
sql.SELECT("cup_no");
@ -143,6 +148,10 @@ public class BsBankActivityRosterRateSqlProvider {
sql.SET("bank_activity_id = #{record.bankActivityId,jdbcType=BIGINT}");
}
if (record.getBankActivityRosterId() != null) {
sql.SET("bank_activity_roster_id = #{record.bankActivityRosterId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
@ -156,7 +165,7 @@ public class BsBankActivityRosterRateSqlProvider {
}
if (record.getWelfareRatesId() != null) {
sql.SET("welfare_rates_id = #{record.welfareRatesId,jdbcType=INTEGER}");
sql.SET("welfare_rates_id = #{record.welfareRatesId,jdbcType=BIGINT}");
}
if (record.getPreferentialModel() != null) {
@ -213,10 +222,11 @@ public class BsBankActivityRosterRateSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("bank_activity_id = #{record.bankActivityId,jdbcType=BIGINT}");
sql.SET("bank_activity_roster_id = #{record.bankActivityRosterId,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}");
sql.SET("welfare_rates_id = #{record.welfareRatesId,jdbcType=INTEGER}");
sql.SET("welfare_rates_id = #{record.welfareRatesId,jdbcType=BIGINT}");
sql.SET("preferential_model = #{record.preferentialModel,jdbcType=INTEGER}");
sql.SET("start_time = #{record.startTime,jdbcType=TIMESTAMP}");
sql.SET("end_time = #{record.endTime,jdbcType=TIMESTAMP}");
@ -242,6 +252,10 @@ public class BsBankActivityRosterRateSqlProvider {
sql.SET("bank_activity_id = #{bankActivityId,jdbcType=BIGINT}");
}
if (record.getBankActivityRosterId() != null) {
sql.SET("bank_activity_roster_id = #{bankActivityRosterId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
@ -255,7 +269,7 @@ public class BsBankActivityRosterRateSqlProvider {
}
if (record.getWelfareRatesId() != null) {
sql.SET("welfare_rates_id = #{welfareRatesId,jdbcType=INTEGER}");
sql.SET("welfare_rates_id = #{welfareRatesId,jdbcType=BIGINT}");
}
if (record.getPreferentialModel() != null) {

@ -13,7 +13,8 @@ public interface BsTradeOrderMapperExt {
@Select("<script>" +
" select " +
" case WHEN sum(trade_actual_amount) is not null then sum(trade_actual_amount) else 0 end tradePrice" +
" case WHEN sum(trade_actual_amount) is not null then sum(trade_actual_amount) else 0 end tradePrice," +
" count(1) count" +
" from bs_trade_order " +
" where 1 = 1" +
" <if test='param.agentId != null'> and agent_id = #{param.agentId}</if>" +
@ -22,12 +23,12 @@ public interface BsTradeOrderMapperExt {
" <if test='param.storeId != null'> and store_id = #{param.storeId} </if>" +
" <if test='param.storeName != null'> and store_name CONCAT('%', #{param.storeName} , '%') </if>" +
" <if test='param.payMode != null'> and pay_mode = #{param.payMode}</if>" +
" <if test='param.outTradeNo != null'> and out_trade_no = #{param.outTradeNo}</if>" +
" <if test='param.outTradeNo != null'> and out_trade_no like CONCAT('%', #{param.outTradeNo} , '%')</if>" +
" <if test='param.accTradeNo != null'> and acc_trade_no = #{param.accTradeNo}</if>" +
" <if test='param.payTimeS != null'> <![CDATA[ and pay_time >= #{param.payTimeS} ]]> </if>" +
" <if test='param.payTimeE != null'> <![CDATA[ and pay_time <= #{param.payTimeE} ]]> </if>" +
" <if test='param.status != null'> and status = #{param.status}</if>" +
"</script>")
BigDecimal countTradeOrderPrice(@Param("param") Map<String, Object> param);
Map<String,Object> countTradeOrderPrice(@Param("param") Map<String, Object> param);
}

@ -2,6 +2,7 @@ package com.hfkj.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* bs_bank_activity_roster
@ -59,6 +60,16 @@ public class BsBankActivityRoster implements Serializable {
private String ext3;
private List<BsBankActivityRosterRate> bankActivityRosterRateList;
public List<BsBankActivityRosterRate> getBankActivityRosterRateList() {
return bankActivityRosterRateList;
}
public void setBankActivityRosterRateList(List<BsBankActivityRosterRate> bankActivityRosterRateList) {
this.bankActivityRosterRateList = bankActivityRosterRateList;
}
private static final long serialVersionUID = 1L;
public Long getId() {
@ -213,4 +224,4 @@ public class BsBankActivityRoster implements Serializable {
sb.append("]");
return sb.toString();
}
}
}

@ -1,7 +1,10 @@
package com.hfkj.entity;
import com.alibaba.fastjson.JSONArray;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* bs_bank_activity_roster_rate
@ -23,6 +26,11 @@ public class BsBankActivityRosterRate implements Serializable {
*/
private Long bankActivityId;
/**
* 活动报名id
*/
private Long bankActivityRosterId;
/**
* 商户id
*/
@ -41,7 +49,7 @@ public class BsBankActivityRosterRate implements Serializable {
/**
* 权益费率ID
*/
private Integer welfareRatesId;
private Long welfareRatesId;
/**
* 封顶优惠模式
@ -91,6 +99,16 @@ public class BsBankActivityRosterRate implements Serializable {
private static final long serialVersionUID = 1L;
private JSONArray rateArray;
public JSONArray getRateArray() {
return rateArray;
}
public void setRateArray(JSONArray rateArray) {
this.rateArray = rateArray;
}
public Long getId() {
return id;
}
@ -107,6 +125,14 @@ public class BsBankActivityRosterRate implements Serializable {
this.bankActivityId = bankActivityId;
}
public Long getBankActivityRosterId() {
return bankActivityRosterId;
}
public void setBankActivityRosterId(Long bankActivityRosterId) {
this.bankActivityRosterId = bankActivityRosterId;
}
public Long getMerId() {
return merId;
}
@ -131,11 +157,11 @@ public class BsBankActivityRosterRate implements Serializable {
this.cupNo = cupNo;
}
public Integer getWelfareRatesId() {
public Long getWelfareRatesId() {
return welfareRatesId;
}
public void setWelfareRatesId(Integer welfareRatesId) {
public void setWelfareRatesId(Long welfareRatesId) {
this.welfareRatesId = welfareRatesId;
}
@ -241,6 +267,7 @@ public class BsBankActivityRosterRate implements Serializable {
BsBankActivityRosterRate other = (BsBankActivityRosterRate) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getBankActivityId() == null ? other.getBankActivityId() == null : this.getBankActivityId().equals(other.getBankActivityId()))
&& (this.getBankActivityRosterId() == null ? other.getBankActivityRosterId() == null : this.getBankActivityRosterId().equals(other.getBankActivityRosterId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getPlatformNo() == null ? other.getPlatformNo() == null : this.getPlatformNo().equals(other.getPlatformNo()))
&& (this.getCupNo() == null ? other.getCupNo() == null : this.getCupNo().equals(other.getCupNo()))
@ -264,6 +291,7 @@ public class BsBankActivityRosterRate implements Serializable {
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getBankActivityId() == null) ? 0 : getBankActivityId().hashCode());
result = prime * result + ((getBankActivityRosterId() == null) ? 0 : getBankActivityRosterId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getPlatformNo() == null) ? 0 : getPlatformNo().hashCode());
result = prime * result + ((getCupNo() == null) ? 0 : getCupNo().hashCode());
@ -290,6 +318,7 @@ public class BsBankActivityRosterRate implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", bankActivityId=").append(bankActivityId);
sb.append(", bankActivityRosterId=").append(bankActivityRosterId);
sb.append(", merId=").append(merId);
sb.append(", platformNo=").append(platformNo);
sb.append(", cupNo=").append(cupNo);
@ -309,4 +338,4 @@ public class BsBankActivityRosterRate implements Serializable {
sb.append("]");
return sb.toString();
}
}
}

@ -245,6 +245,66 @@ public class BsBankActivityRosterRateExample {
return (Criteria) this;
}
public Criteria andBankActivityRosterIdIsNull() {
addCriterion("bank_activity_roster_id is null");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdIsNotNull() {
addCriterion("bank_activity_roster_id is not null");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdEqualTo(Long value) {
addCriterion("bank_activity_roster_id =", value, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdNotEqualTo(Long value) {
addCriterion("bank_activity_roster_id <>", value, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdGreaterThan(Long value) {
addCriterion("bank_activity_roster_id >", value, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdGreaterThanOrEqualTo(Long value) {
addCriterion("bank_activity_roster_id >=", value, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdLessThan(Long value) {
addCriterion("bank_activity_roster_id <", value, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdLessThanOrEqualTo(Long value) {
addCriterion("bank_activity_roster_id <=", value, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdIn(List<Long> values) {
addCriterion("bank_activity_roster_id in", values, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdNotIn(List<Long> values) {
addCriterion("bank_activity_roster_id not in", values, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdBetween(Long value1, Long value2) {
addCriterion("bank_activity_roster_id between", value1, value2, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andBankActivityRosterIdNotBetween(Long value1, Long value2) {
addCriterion("bank_activity_roster_id not between", value1, value2, "bankActivityRosterId");
return (Criteria) this;
}
public Criteria andMerIdIsNull() {
addCriterion("mer_id is null");
return (Criteria) this;
@ -455,52 +515,52 @@ public class BsBankActivityRosterRateExample {
return (Criteria) this;
}
public Criteria andWelfareRatesIdEqualTo(Integer value) {
public Criteria andWelfareRatesIdEqualTo(Long value) {
addCriterion("welfare_rates_id =", value, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdNotEqualTo(Integer value) {
public Criteria andWelfareRatesIdNotEqualTo(Long value) {
addCriterion("welfare_rates_id <>", value, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdGreaterThan(Integer value) {
public Criteria andWelfareRatesIdGreaterThan(Long value) {
addCriterion("welfare_rates_id >", value, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdGreaterThanOrEqualTo(Integer value) {
public Criteria andWelfareRatesIdGreaterThanOrEqualTo(Long value) {
addCriterion("welfare_rates_id >=", value, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdLessThan(Integer value) {
public Criteria andWelfareRatesIdLessThan(Long value) {
addCriterion("welfare_rates_id <", value, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdLessThanOrEqualTo(Integer value) {
public Criteria andWelfareRatesIdLessThanOrEqualTo(Long value) {
addCriterion("welfare_rates_id <=", value, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdIn(List<Integer> values) {
public Criteria andWelfareRatesIdIn(List<Long> values) {
addCriterion("welfare_rates_id in", values, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdNotIn(List<Integer> values) {
public Criteria andWelfareRatesIdNotIn(List<Long> values) {
addCriterion("welfare_rates_id not in", values, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdBetween(Integer value1, Integer value2) {
public Criteria andWelfareRatesIdBetween(Long value1, Long value2) {
addCriterion("welfare_rates_id between", value1, value2, "welfareRatesId");
return (Criteria) this;
}
public Criteria andWelfareRatesIdNotBetween(Integer value1, Integer value2) {
public Criteria andWelfareRatesIdNotBetween(Long value1, Long value2) {
addCriterion("welfare_rates_id not between", value1, value2, "welfareRatesId");
return (Criteria) this;
}

@ -0,0 +1,42 @@
package com.hfkj.service;
import com.hfkj.entity.BsBankActivityRosterRate;
import java.util.List;
/**
* @className: BsBankActivityRosterRateService
* @author: HuRui
* @date: 2023/5/18
**/
public interface BsBankActivityRosterRateService {
/**
* 编辑数据
* @param bankActivityRosterRate
*/
void editData(BsBankActivityRosterRate bankActivityRosterRate);
/**
* 查询费率列表
* @param rosterId
* @return
*/
List<BsBankActivityRosterRate> getListByRosterId(Long rosterId);
/**
* 查询费率列表
* @param activityId
* @param merId
* @return
*/
List<BsBankActivityRosterRate> getListByMerId(Long activityId,Long merId);
/**
* 根据id查询
* @param id
* @return
*/
BsBankActivityRosterRate getRosterRateById(Long id);
}

@ -0,0 +1,50 @@
package com.hfkj.service;
import com.hfkj.entity.BsBankActivityRoster;
import com.hfkj.entity.BsBankActivityRosterRate;
import java.util.List;
import java.util.Map;
/**
* @className: BsBankActivityRosterService
* @author: HuRui
* @date: 2023/5/18
**/
public interface BsBankActivityRosterService {
/**
* 编辑数据
* @param bankActivityRoster
*/
void editData(BsBankActivityRoster bankActivityRoster);
/**
* 报名活动
* @param bankActivityId
* @param merId
*/
void enrollActivity(Long bankActivityId, Long merId) throws Exception;
/**
* 配置费率
* @param bankActivityRosterRateList
*/
void configRosterRate(Long bankActivityId, Long merId, List<BsBankActivityRosterRate> bankActivityRosterRateList) throws Exception;
/**
* 查询报名列表
* @param param
* @return
*/
List<BsBankActivityRoster> getActivityRosterList(Map<String, Object> param);
/**
* 查询报名
* @param bankActivityId
* @param merId
* @return
*/
BsBankActivityRoster getActivityRoster(Long bankActivityId, Long merId);
}

@ -71,7 +71,7 @@ public interface BsTradeOrderService {
* @param param
* @return
*/
BigDecimal countTradeOrderPrice(Map<String, Object> param);
Map<String,Object> countTradeOrderPrice(Map<String, Object> param);
}

@ -0,0 +1,74 @@
package com.hfkj.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.hfkj.dao.BsBankActivityRosterRateMapper;
import com.hfkj.entity.BsBankActivityRosterRate;
import com.hfkj.entity.BsBankActivityRosterRateExample;
import com.hfkj.service.BsBankActivityRosterRateService;
import jdk.nashorn.internal.ir.annotations.Reference;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
* @className: BsBankActivityRosterRateServiceImpl
* @author: HuRui
* @date: 2023/5/18
**/
@Service("bankActivityRosterRateService")
public class BsBankActivityRosterRateServiceImpl implements BsBankActivityRosterRateService {
@Resource
private BsBankActivityRosterRateMapper bsBankActivityRosterRateMapper;
@Override
public void editData(BsBankActivityRosterRate bankActivityRosterRate) {
if (bankActivityRosterRate.getId() == null) {
bankActivityRosterRate.setCreateTime(new Date());
bankActivityRosterRate.setUpdateTime(new Date());
bsBankActivityRosterRateMapper.insert(bankActivityRosterRate);
} else {
bankActivityRosterRate.setUpdateTime(new Date());
bsBankActivityRosterRateMapper.updateByPrimaryKey(bankActivityRosterRate);
}
}
@Override
public List<BsBankActivityRosterRate> getListByRosterId(Long rosterId) {
BsBankActivityRosterRateExample example = new BsBankActivityRosterRateExample();
example.createCriteria().andBankActivityRosterIdEqualTo(rosterId);
example.setOrderByClause("start_time");
List<BsBankActivityRosterRate> rates = bsBankActivityRosterRateMapper.selectByExample(example);
for (BsBankActivityRosterRate bankActivityRosterRate : rates) {
JSONArray rateArray = JSONArray.parseArray(bankActivityRosterRate.getRates());
bankActivityRosterRate.setRateArray(rateArray);
if (StringUtils.isBlank(bankActivityRosterRate.getPreferentialRates())) {
if (rateArray.size() > 0) {
bankActivityRosterRate.setExt1(rateArray.get(0).toString());
} else {
bankActivityRosterRate.setExt1("0");
}
} else {
bankActivityRosterRate.setExt1(bankActivityRosterRate.getPreferentialRates());
}
}
return rates;
}
@Override
public List<BsBankActivityRosterRate> getListByMerId(Long activityId, Long merId) {
BsBankActivityRosterRateExample example = new BsBankActivityRosterRateExample();
example.createCriteria().andBankActivityIdEqualTo(activityId).andMerIdEqualTo(merId);
example.setOrderByClause("create_time desc");
return bsBankActivityRosterRateMapper.selectByExample(example);
}
@Override
public BsBankActivityRosterRate getRosterRateById(Long id) {
return bsBankActivityRosterRateMapper.selectByPrimaryKey(id);
}
}

@ -0,0 +1,155 @@
package com.hfkj.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.saas.SaasActivityService;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.dao.BsBankActivityRosterMapper;
import com.hfkj.entity.*;
import com.hfkj.service.BsBankActivityRosterRateService;
import com.hfkj.service.BsBankActivityRosterService;
import com.hfkj.service.BsBankActivityService;
import com.hfkj.service.BsMerPlatformNoService;
import com.hfkj.sysenum.PlatformTypeEnum;
import org.apache.commons.collections4.ListUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.*;
/**
* @className: BsBankActivityRosterServiceImpl
* @author: HuRui
* @date: 2023/5/18
**/
@Service("bankActivityRosterService")
public class BsBankActivityRosterServiceImpl implements BsBankActivityRosterService {
@Resource
private BsBankActivityRosterMapper bsBankActivityRosterMapper;
@Resource
private BsBankActivityService bankActivityService;
@Resource
private BsBankActivityRosterRateService bankActivityRosterRateService;
@Resource
private BsMerPlatformNoService merPlatformNoService;
@Resource
private SaasActivityService saasActivityService;
@Override
public void editData(BsBankActivityRoster bankActivityRoster) {
if (bankActivityRoster.getId() == null) {
bankActivityRoster.setUpdateTime(new Date());
bankActivityRoster.setCreateTime(new Date());
bsBankActivityRosterMapper.insert(bankActivityRoster);
} else {
bankActivityRoster.setUpdateTime(new Date());
bsBankActivityRosterMapper.updateByPrimaryKey(bankActivityRoster);
}
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void enrollActivity(Long bankActivityId, Long merId) throws Exception {
// 查询报名
BsBankActivityRoster roster = getActivityRoster(bankActivityId, merId);
if (roster != null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请勿重复报名");
}
// 查询活动
BsBankActivity activity = bankActivityService.getBankActivityById(bankActivityId);
if (activity == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的活动");
}
// 查询平台
BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNo(merId, PlatformTypeEnum.type1);
if (merPlatform == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
// 渠道报名
saasActivityService.customerRegisterActivity(activity.getActivityNo().toString(), null, Arrays.asList(merPlatform.getCupNo()));
BsBankActivityRoster bankActivityRoster = new BsBankActivityRoster();
bankActivityRoster.setBankActivityId(bankActivityId);
bankActivityRoster.setMerId(merId);
bankActivityRoster.setPlatformNo(merPlatform.getPlatformNo());
bankActivityRoster.setCupNo(merPlatform.getCupNo());
bankActivityRoster.setStatus(1);
editData(bankActivityRoster);
// 查询渠道费率
JSONArray rates = saasActivityService.queryCustomerRates(activity.getActivityNo().toString(), merPlatform.getPlatformNo());
for (Object obj : rates) {
JSONObject rate = (JSONObject) obj;
BsBankActivityRosterRate rosterRate = new BsBankActivityRosterRate();
rosterRate.setBankActivityId(bankActivityId);
rosterRate.setBankActivityRosterId(bankActivityRoster.getId());
rosterRate.setMerId(bankActivityRoster.getMerId());
rosterRate.setPlatformNo(bankActivityRoster.getPlatformNo());
rosterRate.setCupNo(bankActivityRoster.getCupNo());
rosterRate.setWelfareRatesId(rate.getLong("welfareRatesId"));
rosterRate.setStartTime(rate.getDate("start"));
rosterRate.setEndTime(rate.getDate("end"));
rosterRate.setRates(rate.getString("rates"));
rosterRate.setStatus(2);
bankActivityRosterRateService.editData(rosterRate);
}
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void configRosterRate(Long bankActivityId, Long merId, List<BsBankActivityRosterRate> bankActivityRosterRateList) throws Exception {
BsBankActivity activity = bankActivityService.getBankActivityById(bankActivityId);
if (activity == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
BsMerPlatformNo platformNo = merPlatformNoService.getPlatformNo(merId, PlatformTypeEnum.type1);
if (platformNo == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
for (BsBankActivityRosterRate rosterRate : bankActivityRosterRateList) {
BsBankActivityRosterRate rate = bankActivityRosterRateService.getRosterRateById(rosterRate.getId());
if (rate == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
rate.setPreferentialRates(rosterRate.getPreferentialRates());
rate.setStatus(1);
bankActivityRosterRateService.editData(rate);
}
Map<String, Object> rate;
List<Map<String,Object>> rates = new ArrayList<>();
for (BsBankActivityRosterRate obj : bankActivityRosterRateList) {
rate = new HashMap<>();
rate.put("welfareRatesId", obj.getWelfareRatesId());
rate.put("discountedRates", obj.getPreferentialRates());
rates.add(rate);
}
saasActivityService.customerRatesUpdate(activity.getActivityNo().toString(), platformNo.getCupNo(), rates);
}
@Override
public List<BsBankActivityRoster> getActivityRosterList(Map<String, Object> param) {
BsBankActivityRosterExample example = new BsBankActivityRosterExample();
example.createCriteria();
return bsBankActivityRosterMapper.selectByExample(example);
}
@Override
public BsBankActivityRoster getActivityRoster(Long bankActivityId, Long merId) {
BsBankActivityRosterExample example = new BsBankActivityRosterExample();
example.createCriteria().andBankActivityIdEqualTo(bankActivityId).andMerIdEqualTo(merId);
List<BsBankActivityRoster> list = bsBankActivityRosterMapper.selectByExample(example);
if (list.size() > 0) {
BsBankActivityRoster roster = list.get(0);
roster.setBankActivityRosterRateList(bankActivityRosterRateService.getListByRosterId(roster.getId()));
return roster;
}
return null;
}
}

@ -37,8 +37,9 @@ public class BsBankActivityServiceImpl implements BsBankActivityService {
@Override
public List<BsBankActivity> getBankActivityList(Map<String, Object> param) {
BsBankActivityExample example = new BsBankActivityExample();
example.createCriteria();
return null;
example.createCriteria().andStatusNotEqualTo(0);
example.setOrderByClause("create_time desc");
return bsBankActivityMapper.selectByExample(example);
}
@Override

@ -370,7 +370,21 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
}
@Override
public BigDecimal countTradeOrderPrice(Map<String, Object> param) {
return tradeOrderMapper.countTradeOrderPrice(param);
public Map<String,Object> countTradeOrderPrice(Map<String, Object> param) {
Map<String, Object> paramMap = new HashMap<>();
paramMap.putAll(param);
if (StringUtils.isBlank(MapUtils.getString(paramMap, "outTradeNo"))) {
paramMap.remove("outTradeNo");
}
if (MapUtils.getLong(param, "payTimeS") != null) {
paramMap.put("payTimeS", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeS")), DateUtil.Y_M_D_HMS));
}
if (MapUtils.getLong(param, "payTimeE") != null) {
paramMap.put("payTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeE")), DateUtil.Y_M_D_HMS));
}
return tradeOrderMapper.countTradeOrderPrice(paramMap);
}
}

@ -20,31 +20,31 @@ lkl_v2_private_key=/home/project/gratia-pay/cert/lakala/v2/OP00000003_private_ke
lkl_mer_contract_ret_url=https://gratia-pay.dctpay.com/brest/laKaLaNotify/merContract
lkl_micro_pay_ret_url=https://gratia-pay.dctpay.com/crest/laKaLaNotify/microPay
#lkl_saas_client_id=testsit
#lkl_saas_client_secret=EguwEckByf2I6u6z
#lkl_saas_activity_id=37
#lkl_saas_user_no=20000101
#lkl_saas_request_url=https://test.wsmsd.cn/sit/
#lkl_saas_request_mer_registration_token_url=https://test.wsmsd.cn/sit/htkauth/oauth/token
#lkl_saas_request_mer_registration_url=https://test.wsmsd.cn/sit/htkregistration/merchant/
#lkl_saas_request_mer_update_url=https://test.wsmsd.cn/sit/htk-api/
#lkl_saas_request_mer_registration_common_url=https://test.wsmsd.cn/sit/htkregistration/
#lkl_saas_request_mer_url=https://test.wsmsd.cn/sit/htkmerchants/
#lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp5aV3ZiXG2R8Yd8Nxocv+cF7VAUHBc0TF4MNne7mI8wM2yEP2QgI+rK1qDf6G7ZFPhutpIHKQchpolbSuC0vgaHpSjO9OUs1fpnK/JjZq9o8DatUsA0n4Fccec9NBbV5dy5yrwro7xmDpsevp1/IeiIssi1+iD+nBWqqVFx7GVQIDAQAB
#lkl_saas_private_key="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKnlpXdmJcbZHxh3w3Ghy/5wXtUBQcFzRMXgw2d7uYjzAzbIQ/ZCAj6srWoN/obtkU+G62kgcpByGmiVtK4LS+BoelKM705SzV+mcr8mNmr2jwNq1SwDSfgVxx5z00FtXl3LnKvCujvGYOmx6+nX8h6IiyyLX6IP6cFaqpUXHsZVAgMBAAECgYA4NpeM7etJ48T6H4Y3LsWEJkH6UDQlgbIblsaQkstMmLtTgOebrzN28UNfd8njcu9FVOrHGclOKbK7L+1cOLiduWsZKc/c/gAy9wAR4EhoLvlerH9EEPiPWFxdEDbMxPqlkpqLOo+PxHrhTn4vU4CaPdJtL2ujKn7nmsUdUDWo8QJBANS1TlM6nhPt2XlzN5kGfsJ4kBYNjuLXNA2YdNuC2ttYvEXHJ9T70FN/GnRBBIZu47uHH3Ie5nfep+qMk6a8RP8CQQDMecIyI0z1kVt+tOfWKw2ZFLsi74708qTaeR4W1ABtkngj1+bxoWWXr3KqhjqJkWxnhioSfXqu7CScNzjdM1CrAkAQd+ESjI1EmbumrYb2cAxMXi05p98SLPs4uj8B58WuCda5yEuLL9vXOxX/PjFtfxRepn2GxmGtki2J+UxNMnJdAkAFoORjlO0tZU7rcfdfwdeh+xwbnhSFUZiQGv1lC3jnizybX/oPdK3jOwUhBIjf+IzPXLYTxDh4UC/BzRNXo235AkEAhgYBk6H7RU2iIuvwz1c6CtE1gJ8DvEp1F0KOMWMFB0KCpDXUToix0dlMz962FozYENi4X4zYQo6nFwlXeS3Pfw==
lkl_saas_client_id=huifu
lkl_saas_client_secret=f65VVjqJfLtc177F
lkl_saas_activity_id=12
lkl_saas_user_no=22206482
lkl_saas_request_url=https://tkapi.lakala.com/
lkl_saas_request_mer_registration_token_url=https://tkapi.lakala.com/auth/oauth/token
lkl_saas_request_mer_registration_url=https://htkactvi.lakala.com/registration/merchant/
lkl_saas_request_mer_update_url=https://htkapi.lakala.com/api/
lkl_saas_request_mer_registration_common_url=https://htkactvi.lakala.com/registration/
lkl_saas_request_mer_url=https://tkapi.lakala.com/htkmerchants/
lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAUkzRA+4GOS5OzYqxD/UJwM6p9to1dPvetL/7RbMa93o46qToPlPtaW61EvblOldHcBEHo7AGXXKmIYr7t2Up1PZC0g7UMpno/b5WkT6ieJ601Xreuj8hhyf2/xoej5vpi4/+lAr9YF+5GcyaVf4gfzTNJrmKj9PfvX5B3rUH2QIDAQAB
lkl_saas_private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMBSTNED7gY5Lk7NirEP9QnAzqn22jV0+960v/tFsxr3ejjqpOg+U+1pbrUS9uU6V0dwEQejsAZdcqYhivu3ZSnU9kLSDtQymej9vlaRPqJ4nrTVet66PyGHJ/b/Gh6Pm+mLj/6UCv1gX7kZzJpV/iB/NM0muYqP09+9fkHetQfZAgMBAAECgYB42D3kaC+8QVnTsluffoNeKYSyT6Y1SNiqy7CGVvl/zFlEQkx0khVybHlf1hbFWq9U+Bn7TuNgXH+Z3CHUoRwy4Ap/kMx637iRatoC8F/kcPaiB7JFQfdrxhgK858dSyHCQ2OXXQDJgJdth+oF9FylVsrDu5Sw3ha4OuzrmufuwQJBAPnPPSeFr1wu7kH6I+A5E49fMbAm7EU+3TYVzxNH1lr3X/LWuK9pi/LVPrSR4eNgAypyQWREIqdpBIiJ9bOnwa0CQQDFFl0zTQTVTWf5r/hwgCUMo4gHr2y/q7XMNe6n5fh4SQuQ+o4gW+BGHzDrT97G5hFGPL+w5niGuEBHWSo5/9xdAkEAnrxdM7vzDjSUGUCFg3lBQJ1QyYoyIF4t2qxJBQtk3jDKu1hNysjasNdoHP2F+CGOYW5wtvHEw3Qr+UcQ5bP3kQJABPAcga6KUnXQBxd7mAX956UpQVgJ13uL4IPxaM+APDNIUOeWLAVhRyB870hfAoi9Ig9fliUQG//9zEvVnQJmGQJBAOb8Z0mGMEbEeAyEKjqoNiQkkIcoBdmPKNFUoUJ6ohcBNOoMfklvNsf2+BPfuhs26tvhYDBRgCAfOVhqTQcGj6I=
lkl_saas_client_id=testsit
lkl_saas_client_secret=EguwEckByf2I6u6z
lkl_saas_activity_id=37
lkl_saas_user_no=20000101
lkl_saas_request_url=https://test.wsmsd.cn/sit/
lkl_saas_request_mer_registration_token_url=https://test.wsmsd.cn/sit/htkauth/oauth/token
lkl_saas_request_mer_registration_url=https://test.wsmsd.cn/sit/htkregistration/merchant/
lkl_saas_request_mer_update_url=https://test.wsmsd.cn/sit/htk-api/
lkl_saas_request_mer_registration_common_url=https://test.wsmsd.cn/sit/htkregistration/
lkl_saas_request_mer_url=https://test.wsmsd.cn/sit/htkmerchants/
lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp5aV3ZiXG2R8Yd8Nxocv+cF7VAUHBc0TF4MNne7mI8wM2yEP2QgI+rK1qDf6G7ZFPhutpIHKQchpolbSuC0vgaHpSjO9OUs1fpnK/JjZq9o8DatUsA0n4Fccec9NBbV5dy5yrwro7xmDpsevp1/IeiIssi1+iD+nBWqqVFx7GVQIDAQAB
lkl_saas_private_key="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKnlpXdmJcbZHxh3w3Ghy/5wXtUBQcFzRMXgw2d7uYjzAzbIQ/ZCAj6srWoN/obtkU+G62kgcpByGmiVtK4LS+BoelKM705SzV+mcr8mNmr2jwNq1SwDSfgVxx5z00FtXl3LnKvCujvGYOmx6+nX8h6IiyyLX6IP6cFaqpUXHsZVAgMBAAECgYA4NpeM7etJ48T6H4Y3LsWEJkH6UDQlgbIblsaQkstMmLtTgOebrzN28UNfd8njcu9FVOrHGclOKbK7L+1cOLiduWsZKc/c/gAy9wAR4EhoLvlerH9EEPiPWFxdEDbMxPqlkpqLOo+PxHrhTn4vU4CaPdJtL2ujKn7nmsUdUDWo8QJBANS1TlM6nhPt2XlzN5kGfsJ4kBYNjuLXNA2YdNuC2ttYvEXHJ9T70FN/GnRBBIZu47uHH3Ie5nfep+qMk6a8RP8CQQDMecIyI0z1kVt+tOfWKw2ZFLsi74708qTaeR4W1ABtkngj1+bxoWWXr3KqhjqJkWxnhioSfXqu7CScNzjdM1CrAkAQd+ESjI1EmbumrYb2cAxMXi05p98SLPs4uj8B58WuCda5yEuLL9vXOxX/PjFtfxRepn2GxmGtki2J+UxNMnJdAkAFoORjlO0tZU7rcfdfwdeh+xwbnhSFUZiQGv1lC3jnizybX/oPdK3jOwUhBIjf+IzPXLYTxDh4UC/BzRNXo235AkEAhgYBk6H7RU2iIuvwz1c6CtE1gJ8DvEp1F0KOMWMFB0KCpDXUToix0dlMz962FozYENi4X4zYQo6nFwlXeS3Pfw==
#lkl_saas_client_id=huifu
#lkl_saas_client_secret=f65VVjqJfLtc177F
#lkl_saas_activity_id=12
#lkl_saas_user_no=22206482
#lkl_saas_request_url=https://tkapi.lakala.com/
#lkl_saas_request_mer_registration_token_url=https://tkapi.lakala.com/auth/oauth/token
#lkl_saas_request_mer_registration_url=https://htkactvi.lakala.com/registration/merchant/
#lkl_saas_request_mer_update_url=https://htkapi.lakala.com/api/
#lkl_saas_request_mer_registration_common_url=https://htkactvi.lakala.com/registration/
#lkl_saas_request_mer_url=https://tkapi.lakala.com/htkmerchants/
#lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAUkzRA+4GOS5OzYqxD/UJwM6p9to1dPvetL/7RbMa93o46qToPlPtaW61EvblOldHcBEHo7AGXXKmIYr7t2Up1PZC0g7UMpno/b5WkT6ieJ601Xreuj8hhyf2/xoej5vpi4/+lAr9YF+5GcyaVf4gfzTNJrmKj9PfvX5B3rUH2QIDAQAB
#lkl_saas_private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMBSTNED7gY5Lk7NirEP9QnAzqn22jV0+960v/tFsxr3ejjqpOg+U+1pbrUS9uU6V0dwEQejsAZdcqYhivu3ZSnU9kLSDtQymej9vlaRPqJ4nrTVet66PyGHJ/b/Gh6Pm+mLj/6UCv1gX7kZzJpV/iB/NM0muYqP09+9fkHetQfZAgMBAAECgYB42D3kaC+8QVnTsluffoNeKYSyT6Y1SNiqy7CGVvl/zFlEQkx0khVybHlf1hbFWq9U+Bn7TuNgXH+Z3CHUoRwy4Ap/kMx637iRatoC8F/kcPaiB7JFQfdrxhgK858dSyHCQ2OXXQDJgJdth+oF9FylVsrDu5Sw3ha4OuzrmufuwQJBAPnPPSeFr1wu7kH6I+A5E49fMbAm7EU+3TYVzxNH1lr3X/LWuK9pi/LVPrSR4eNgAypyQWREIqdpBIiJ9bOnwa0CQQDFFl0zTQTVTWf5r/hwgCUMo4gHr2y/q7XMNe6n5fh4SQuQ+o4gW+BGHzDrT97G5hFGPL+w5niGuEBHWSo5/9xdAkEAnrxdM7vzDjSUGUCFg3lBQJ1QyYoyIF4t2qxJBQtk3jDKu1hNysjasNdoHP2F+CGOYW5wtvHEw3Qr+UcQ5bP3kQJABPAcga6KUnXQBxd7mAX956UpQVgJ13uL4IPxaM+APDNIUOeWLAVhRyB870hfAoi9Ig9fliUQG//9zEvVnQJmGQJBAOb8Z0mGMEbEeAyEKjqoNiQkkIcoBdmPKNFUoUJ6ohcBNOoMfklvNsf2+BPfuhs26tvhYDBRgCAfOVhqTQcGj6I=
wechat_pay_notify_url=https://gratia-pay.dctpay.com/crest/weiXinNotify/jsapiPay

Loading…
Cancel
Save