测试环境部署
This commit is contained in:
parent
ecf5e697cf
commit
3a4965444e
|
|
@ -13,7 +13,7 @@ import java.io.Serializable;
|
|||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
public class MarriageCodeDTO1 extends PageDTO implements Serializable {
|
||||
public class MarriageCodeNewDTO extends PageDTO implements Serializable {
|
||||
|
||||
private String marriageNo;//结婚登记证号
|
||||
private String receiveName;//领取人姓名
|
||||
|
|
@ -29,7 +29,6 @@ public class MarriageCodeServiceImpl extends ServiceImpl<MarriageCodeMapper, Mar
|
|||
|
||||
@Transactional
|
||||
@Override
|
||||
@Async
|
||||
public void createCode(MarriageActivity marriageActivity, String createUser) {
|
||||
Date now = DateTimeUtil.now();
|
||||
for (int i = 0; i < marriageActivity.getTotalSum(); i++) {
|
||||
|
|
|
|||
|
|
@ -1,24 +1,19 @@
|
|||
package com.jinrui.marriage.client.controller;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.jinrui.assembly.utils.DateTimeUtil;
|
||||
import com.jinrui.assembly.utils.result.ResultObject;
|
||||
import com.jinrui.assembly.utils.result.ResultUtil;
|
||||
import com.jinrui.core.consts.RedisCacheKey;
|
||||
import com.jinrui.core.model.dto.MarriageCodeDTO;
|
||||
import com.jinrui.core.model.dto.MarriageCodeDTO1;
|
||||
import com.jinrui.core.model.dto.MarriageCodeNewDTO;
|
||||
import com.jinrui.core.model.entity.MarriageCode;
|
||||
import com.jinrui.core.model.entity.MarriageSales;
|
||||
import com.jinrui.core.model.entity.MarriageActivity;
|
||||
import com.jinrui.core.model.vo.MarriageCodeListVO;
|
||||
import com.jinrui.core.model.vo.MarriageCodeVO;
|
||||
import com.jinrui.core.model.vo.MarriageSalesVO;
|
||||
import com.jinrui.core.redis.RedisCacheManager;
|
||||
import com.jinrui.core.service.IMarriageCodeService;
|
||||
import com.jinrui.core.service.IMarriageSalesService;
|
||||
import com.jinrui.core.service.IMarriageActivityService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
|
@ -29,7 +24,6 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -109,6 +103,7 @@ public class MarriageController {
|
|||
data.put("activityEndTime", DateTimeUtil.formatDateTime(act.getActivityEndTime()));
|
||||
data.put("money", act.getMoney());
|
||||
data.put("status", act.getStatus());
|
||||
data.put("totalMoney", act.getTotalMoney()/100d);
|
||||
return ResultUtil.success(data);
|
||||
}
|
||||
|
||||
|
|
@ -171,7 +166,7 @@ public class MarriageController {
|
|||
}
|
||||
|
||||
@PostMapping("/receiveCheck2")
|
||||
public ResultObject receiveCheck2(@RequestBody MarriageCodeDTO1 dto) {
|
||||
public ResultObject receiveCheck2(@RequestBody MarriageCodeNewDTO dto) {
|
||||
if (StringUtils.isBlank(dto.getMarriageNo())) {
|
||||
return ResultUtil.failedMessage("结婚证字号不能为空!");
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.jinrui.assembly.utils.result.ResultObject;
|
|||
import com.jinrui.assembly.utils.result.ResultUtil;
|
||||
import com.jinrui.core.consts.RedisCacheKey;
|
||||
import com.jinrui.core.redis.RedisCacheManager;
|
||||
import com.jinrui.marriage.client.dto.WxParamsDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -39,9 +40,9 @@ public class WXController {
|
|||
|
||||
|
||||
@PostMapping(value = "getParam")
|
||||
public ResultObject getParam() {
|
||||
public ResultObject getParam(@RequestBody WxParamsDTO wxParamsDTO) {
|
||||
try {
|
||||
Map<String, Object> map = getResult();
|
||||
Map<String, Object> map = getResult(wxParamsDTO.getUrl());
|
||||
if (map == null) {
|
||||
return ResultUtil.failedMessage("系统内部错误!");
|
||||
}
|
||||
|
|
@ -52,10 +53,10 @@ public class WXController {
|
|||
}
|
||||
}
|
||||
|
||||
public Map<String, Object> getResult() throws Exception {
|
||||
public Map<String, Object> getResult(String url) throws Exception {
|
||||
String ticket = getTicket();
|
||||
if (StringUtils.isNotBlank(ticket)) {
|
||||
Map<String, Object> ret = sign(ticket);
|
||||
Map<String, Object> ret = sign(ticket,url);
|
||||
ret.put("appId", appId);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -71,13 +72,15 @@ public class WXController {
|
|||
return ticket;
|
||||
}
|
||||
|
||||
public Map<String, Object> sign(String jsapi_ticket) throws Exception {
|
||||
public Map<String, Object> sign(String jsapi_ticket,String url) throws Exception {
|
||||
Map<String, Object> ret = new HashMap<String, Object>();
|
||||
String nonce_str = UUID.randomUUID().toString().replace("-", "");
|
||||
Long timestamp = System.currentTimeMillis() / 1000;
|
||||
String string1;
|
||||
String signature = "";
|
||||
|
||||
if (StringUtils.isEmpty(url)) {
|
||||
url = this.url;
|
||||
}
|
||||
//注意这里参数名必须全部小写,且必须有序
|
||||
string1 = "jsapi_ticket=" + jsapi_ticket +
|
||||
"&noncestr=" + nonce_str +
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
package com.jinrui.marriage.client.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WxParamsDTO {
|
||||
private String url;
|
||||
}
|
||||
|
|
@ -60,10 +60,14 @@ sms:
|
|||
signId: 27289
|
||||
codeTemplateId: 1
|
||||
|
||||
#wechat:
|
||||
# appId: wxaae06e5a98cdef82
|
||||
# secret: 5d6acf5b1c8452ae4831e61cfb87a2c4
|
||||
# url: https://nx.smartjinrui.cn/h5-marriage/
|
||||
wechat:
|
||||
appId: wxaae06e5a98cdef82
|
||||
secret: 5d6acf5b1c8452ae4831e61cfb87a2c4
|
||||
url: https://nx.smartjinrui.cn/h5-marriage/
|
||||
appId: wx2485a84669fecb4a
|
||||
secret: 4982caf47744628803414ecf45a5863c
|
||||
url: https://fucai-redeem.smartjinrui.cn/#/Index
|
||||
|
||||
|
||||
# token配置
|
||||
|
|
|
|||
Loading…
Reference in New Issue