Commit 37a678cf by 伍思炜

新智能平台对接开发

parent 400080d8
...@@ -134,23 +134,24 @@ public class DankuanController { ...@@ -134,23 +134,24 @@ public class DankuanController {
String campus = request.getParameter("campus"); String campus = request.getParameter("campus");
String regularId = request.getParameter("productIntroductionPic2"); String regularId = request.getParameter("productIntroductionPic2");
if (sell != null && StringUtils.isNumeric(sell)) { if (sell != null && StringUtils.isNumeric(sell)) {
} else { } else {
sell = ""; sell = "";
} }
// 校验多媒体账号
if (StringUtils.isNotBlank(orderCustomerAccount)) { if (StringUtils.isNotBlank(orderCustomerAccount)) {
if (StringUtils.isNotBlank(regularId)){ if (StringUtils.isNotBlank(regularId)){
Wrapper<Regular> wrapper = new EntityWrapper<>(); Wrapper<Regular> wrapper = new EntityWrapper<>();
Regular regular = regularMapper.selectById(regularId); Regular regular = regularMapper.selectById(regularId);
if (StringUtils.isNotBlank(regular.getRegular())) { if (StringUtils.isNotBlank(regular.getRegular())) {
String orderCustomerAccounts = orderCustomerAccount.split("@")[0]; if (!"手机号".equals(regular.getRegularName())){
Pattern iphoneVerification = Pattern.compile(regular.getRegular().replace("/", "")); String orderCustomerAccounts = orderCustomerAccount.split("@")[0];
if (!iphoneVerification.matcher(orderCustomerAccounts).matches()) { Pattern iphoneVerification = Pattern.compile(regular.getRegular().replace("/", ""));
return ResponseData.error(regular.getTips()); if (!iphoneVerification.matcher(orderCustomerAccounts).matches()) {
return ResponseData.error("多媒体账号格式错误");
}
} }
} }
} }
...@@ -158,9 +159,17 @@ public class DankuanController { ...@@ -158,9 +159,17 @@ public class DankuanController {
return ResponseData.error("多媒体账号不能为空"); return ResponseData.error("多媒体账号不能为空");
} }
// 校验多媒体密码
if (StringUtils.isNotBlank(orderCustomerPwd)) { if (StringUtils.isNotBlank(orderCustomerPwd)) {
if (!CheckPwd.checkPassword(orderCustomerPwd)) { // 广美学校判断
return ResponseData.error("多媒体账号的密码必须为8~12位的数字加字母组合"); if (StringUtils.isNotBlank(productId) && "84".equals(productId)){
if (!orderNumber.substring(10).equals(orderCustomerPwd)) {
return ResponseData.error("多媒体账号的密码必须为身份证8位");
}
}else {
if (!CheckPwd.checkPassword(orderCustomerPwd)) {
return ResponseData.error("多媒体账号的密码必须为8~12位的数字加字母组合");
}
} }
} else { } else {
return ResponseData.error("多媒体账号的密码不能为空"); return ResponseData.error("多媒体账号的密码不能为空");
......
...@@ -176,15 +176,18 @@ public class RongHeController { ...@@ -176,15 +176,18 @@ public class RongHeController {
sell = ""; sell = "";
} }
// 校验多媒体账号
if (StringUtils.isNotBlank(orderCustomerAccount)) { if (StringUtils.isNotBlank(orderCustomerAccount)) {
if (StringUtils.isNotBlank(regularId)){ if (StringUtils.isNotBlank(regularId)){
Wrapper<Regular> wrapper = new EntityWrapper<>(); Wrapper<Regular> wrapper = new EntityWrapper<>();
Regular regular = regularMapper.selectById(regularId); Regular regular = regularMapper.selectById(regularId);
if (StringUtils.isNotBlank(regular.getRegular())) { if (StringUtils.isNotBlank(regular.getRegular())) {
String orderCustomerAccounts = orderCustomerAccount.split("@")[0]; if (!"手机号".equals(regular.getRegularName())){
Pattern iphoneVerification = Pattern.compile(regular.getRegular().replace("/", "")); String orderCustomerAccounts = orderCustomerAccount.split("@")[0];
if (!iphoneVerification.matcher(orderCustomerAccounts).matches()) { Pattern iphoneVerification = Pattern.compile(regular.getRegular().replace("/", ""));
return ResponseData.error(regular.getTips()); if (!iphoneVerification.matcher(orderCustomerAccounts).matches()) {
return ResponseData.error("多媒体账号格式错误");
}
} }
} }
} }
...@@ -192,9 +195,17 @@ public class RongHeController { ...@@ -192,9 +195,17 @@ public class RongHeController {
return ResponseData.error("多媒体账号不能为空"); return ResponseData.error("多媒体账号不能为空");
} }
// 校验多媒体密码
if (StringUtils.isNotBlank(orderCustomerPwd)) { if (StringUtils.isNotBlank(orderCustomerPwd)) {
if (!CheckPwd.checkPassword(orderCustomerPwd)) { // 广美学校判断
return ResponseData.error("多媒体账号的密码必须为8~12位的数字加字母组合"); if (StringUtils.isNotBlank(productId) && "84".equals(productId)){
if (!orderNumber.substring(10).equals(orderCustomerPwd)) {
return ResponseData.error("多媒体账号的密码必须为身份证8位");
}
}else {
if (!CheckPwd.checkPassword(orderCustomerPwd)) {
return ResponseData.error("多媒体账号的密码必须为8~12位的数字加字母组合");
}
} }
} else { } else {
return ResponseData.error("多媒体账号的密码不能为空"); return ResponseData.error("多媒体账号的密码不能为空");
......
...@@ -3,10 +3,12 @@ package com.winsun.mapper; ...@@ -3,10 +3,12 @@ package com.winsun.mapper;
import com.baomidou.mybatisplus.mapper.BaseMapper; import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.winsun.bean.Regular; import com.winsun.bean.Regular;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@Mapper @Mapper
@Component @Component
public interface RegularMapper extends BaseMapper<Regular> { public interface RegularMapper extends BaseMapper<Regular> {
@Select("select * from hhr_zzpz_manage where regular_name = #{regularName}")
Regular selectByRegularName(String regularName);
} }
...@@ -92,8 +92,11 @@ public class IntelligenceSendOrder { ...@@ -92,8 +92,11 @@ public class IntelligenceSendOrder {
log.info("订单号:" + ORDERSEQ + ",在order_view表中无记录,无法进行智能平台下单"); log.info("订单号:" + ORDERSEQ + ",在order_view表中无记录,无法进行智能平台下单");
return; return;
} }
//产品价格
ORDERAMOUNT = orderMap.get("webOrderAmount") != null ? orderMap.get("webOrderAmount").toString() : "0"; ORDERAMOUNT = orderMap.get("webOrderAmount") != null ? orderMap.get("webOrderAmount").toString() : "0";
//穗易付订单号
ORDERREQTRANSEQ = orderMap.get("orderReqtranSeq") != null ? orderMap.get("orderReqtranSeq").toString() : ""; ORDERREQTRANSEQ = orderMap.get("orderReqtranSeq") != null ? orderMap.get("orderReqtranSeq").toString() : "";
//支付平台流水号
UPTRANSEQ = orderMap.get("uptranseq") != null ? orderMap.get("uptranseq").toString() : ""; UPTRANSEQ = orderMap.get("uptranseq") != null ? orderMap.get("uptranseq").toString() : "";
// 根据学校名称,获取该学校信息 // 根据学校名称,获取该学校信息
...@@ -165,15 +168,15 @@ public class IntelligenceSendOrder { ...@@ -165,15 +168,15 @@ public class IntelligenceSendOrder {
// 3、提交订单到智能平台 // 3、提交订单到智能平台
JSONObject submitOrderJsonObject = JSONObject submitOrderJsonObject =
getOrderInfo( getOrderInfo(
schoolMap, schoolMap, //宽带订单对应的学校信息
orderMap, orderMap, //宽带订单信息
currentTimeStr, currentTimeStr, //当前时间
productId, productId, //产品ID
saleId, saleId, //销售员ID
ORDERSEQ, ORDERSEQ, //kd_order_id 宽带ID
UPTRANSEQ, UPTRANSEQ, //支付平台流水号
ORDERAMOUNT, ORDERAMOUNT, //产品价格
ORDERREQTRANSEQ, ORDERREQTRANSEQ, //穗易付订单号
0); 0);
log.info( log.info(
"----------调用单宽带接口(提交订单至智能平台)并返回参数信息---status:" "----------调用单宽带接口(提交订单至智能平台)并返回参数信息---status:"
...@@ -347,16 +350,16 @@ public class IntelligenceSendOrder { ...@@ -347,16 +350,16 @@ public class IntelligenceSendOrder {
* @throws Exception * @throws Exception
*/ */
private JSONObject getOrderInfo( private JSONObject getOrderInfo(
Map<String, Object> schoolMap, Map<String, Object> schoolMap, //宽带订单对应的学校信息
Map<String, Object> orderMap, Map<String, Object> orderMap, //宽带订单信息
String currentTimeStr, String currentTimeStr, //当前时间
String productId, String productId, //产品ID
String saleId, String saleId, //销售项ID
String ORDERSEQ, String ORDERSEQ, //kd_order_id 宽带ID
String UPTRANSEQ, String UPTRANSEQ, //支付平台流水号
String ORDERAMOUNT, String ORDERAMOUNT, //产品价格
String ORDERREQTRANSEQ, String ORDERREQTRANSEQ, //穗易付订单号
int count) int count) //0
throws Exception { throws Exception {
log.info("前置提交参数:schoolMap:" + schoolMap+",orderMap:"+orderMap); log.info("前置提交参数:schoolMap:" + schoolMap+",orderMap:"+orderMap);
List<NameValuePair> qParams = new ArrayList<NameValuePair>(); List<NameValuePair> qParams = new ArrayList<NameValuePair>();
...@@ -417,20 +420,20 @@ public class IntelligenceSendOrder { ...@@ -417,20 +420,20 @@ public class IntelligenceSendOrder {
qParams.add(new BasicNameValuePair("deliveryCity", "广州市")); // 配送地址-市,必填 qParams.add(new BasicNameValuePair("deliveryCity", "广州市")); // 配送地址-市,必填
signMap.put("deliveryCity", "广州市"); signMap.put("deliveryCity", "广州市");
String addressDistrict = null; String addressDistrict = null; //所在区域
String address = null; String address = null; //装机地址
String addressID = null; String addressID = null; //地址ID
String landId = null; String landId = null; //揽装工号
String universityTerminalType = null; String universityTerminalType = null; //允许上网终端类型
String universityUserCategory = null; String universityUserCategory = null; //用户类别
String universityUserType = null; String universityUserType = null; //用户类型
String universityMonthlyRentType = null; String universityMonthlyRentType = null; //月租类型
String universityChargingAttribute = null; String universityChargingAttribute = null; //计费属性
String universityOnlineNumber = null; String universityOnlineNumber = null; //最大在线数
String universityOneManTerminal = null; String universityOneManTerminal = null; //一人一号多终端:0否 1是
String universityIsFtthHub = null; String universityIsFtthHub = null; //是否FTTH+HUB:0否 1是
String universityExteriorLines = null; String universityExteriorLines = null; //外线方式
String universityChargeMode = null; String universityChargeMode = null; //收费模式
if (BeanUtil.isNotBlank(schoolMap)) { if (BeanUtil.isNotBlank(schoolMap)) {
addressDistrict = (String) schoolMap.get("universityRegion"); addressDistrict = (String) schoolMap.get("universityRegion");
address = (String) schoolMap.get("universityInstalledAddress"); address = (String) schoolMap.get("universityInstalledAddress");
...@@ -471,15 +474,10 @@ public class IntelligenceSendOrder { ...@@ -471,15 +474,10 @@ public class IntelligenceSendOrder {
signMap.put("deliveryDistrict", addressDistrict); signMap.put("deliveryDistrict", addressDistrict);
qParams.add(new BasicNameValuePair("deliveryAddress", address)); // 配送地址-详细地址,必填 qParams.add(new BasicNameValuePair("deliveryAddress", address)); // 配送地址-详细地址,必填
signMap.put("deliveryAddress", address); signMap.put("deliveryAddress", address);
qParams.add(new BasicNameValuePair("deliveryContact", (String) orderMap.get("orderName"))); // 报装联系人,必填
qParams.add(
new BasicNameValuePair("deliveryContact", (String) orderMap.get("orderName"))); // 报装联系人,必填
signMap.put("deliveryContact", (String) orderMap.get("orderName")); signMap.put("deliveryContact", (String) orderMap.get("orderName"));
qParams.add( qParams.add(new BasicNameValuePair("deliveryContactPhone", (String) orderMap.get("orderPhone"))); // 报装联系电话,必填
new BasicNameValuePair(
"deliveryContactPhone", (String) orderMap.get("orderPhone"))); // 报装联系电话,必填
signMap.put("deliveryContactPhone", (String) orderMap.get("orderPhone")); signMap.put("deliveryContactPhone", (String) orderMap.get("orderPhone"));
qParams.add(new BasicNameValuePair("invoiced", "0")); // 是否需要发票 0:否 1:是,必填 qParams.add(new BasicNameValuePair("invoiced", "0")); // 是否需要发票 0:否 1:是,必填
signMap.put("invoiced", "0"); signMap.put("invoiced", "0");
qParams.add(new BasicNameValuePair("invoiceTitle", "")); // 若需要发票,发票抬头,必填 qParams.add(new BasicNameValuePair("invoiceTitle", "")); // 若需要发票,发票抬头,必填
...@@ -494,19 +492,11 @@ public class IntelligenceSendOrder { ...@@ -494,19 +492,11 @@ public class IntelligenceSendOrder {
signMap.put("comarketingLanId", ""); signMap.put("comarketingLanId", "");
qParams.add(new BasicNameValuePair("groupComarketingLanId", "")); // 集团协销工号,选填 qParams.add(new BasicNameValuePair("groupComarketingLanId", "")); // 集团协销工号,选填
signMap.put("groupComarketingLanId", ""); signMap.put("groupComarketingLanId", "");
qParams.add( qParams.add(new BasicNameValuePair("orderOutNum", (String) orderMap.get("orderSeq"))); // 外部订单编号,选填!;通过API接口下单,必须传入一个外部接入商的订单编号,该编号与智能营销系统编号一一对应
new BasicNameValuePair(
"orderOutNum",
(String)
orderMap.get(
"orderSeq"))); // 外部订单编号,选填!;通过API接口下单,必须传入一个外部接入商的订单编号,该编号与智能营销系统编号一一对应
signMap.put("orderOutNum", (String) orderMap.get("orderSeq")); signMap.put("orderOutNum", (String) orderMap.get("orderSeq"));
qParams.add(new BasicNameValuePair("orderSource", "校园宽带自助受理")); // 订单来源 ,选填 qParams.add(new BasicNameValuePair("orderSource", "校园宽带自助受理")); // 订单来源 ,选填
signMap.put("orderSource", "校园宽带自助受理"); signMap.put("orderSource", "校园宽带自助受理");
qParams.add( qParams.add(new BasicNameValuePair("orderSourceNum", (String) orderMap.get("orderSeq"))); // 订单来源单号,选填; 与订单来源对应,用于业务上记录订单的来源订单编号
new BasicNameValuePair(
"orderSourceNum",
(String) orderMap.get("orderSeq"))); // 订单来源单号,选填; 与订单来源对应,用于业务上记录订单的来源订单编号
signMap.put("orderSourceNum", (String) orderMap.get("orderSeq")); signMap.put("orderSourceNum", (String) orderMap.get("orderSeq"));
qParams.add(new BasicNameValuePair("salePointCode", "")); // 销售点编码,选填 qParams.add(new BasicNameValuePair("salePointCode", "")); // 销售点编码,选填
signMap.put("salePointCode", ""); signMap.put("salePointCode", "");
...@@ -518,13 +508,10 @@ public class IntelligenceSendOrder { ...@@ -518,13 +508,10 @@ public class IntelligenceSendOrder {
signMap.put("agent", ""); signMap.put("agent", "");
qParams.add(new BasicNameValuePair("copyied", "0")); // 是否收取复印件(0:否 1:是),必填 qParams.add(new BasicNameValuePair("copyied", "0")); // 是否收取复印件(0:否 1:是),必填
signMap.put("copyied", "0"); signMap.put("copyied", "0");
qParams.add( qParams.add(new BasicNameValuePair("deliveryContactPhone", (String) orderMap.get("orderPhone"))); // 联系人电话 ,必填
new BasicNameValuePair(
"deliveryContactPhone", (String) orderMap.get("orderPhone"))); // 联系人电话 ,必填
signMap.put("deliveryContactPhone", (String) orderMap.get("orderPhone")); signMap.put("deliveryContactPhone", (String) orderMap.get("orderPhone"));
qParams.add(new BasicNameValuePair("deliveryContactPhone2", "")); // 联系人电话2,选填 qParams.add(new BasicNameValuePair("deliveryContactPhone2", "")); // 联系人电话2,选填
signMap.put("deliveryContactPhone2", ""); signMap.put("deliveryContactPhone2", "");
qParams.add(new BasicNameValuePair("addressId", addressID)); // 地址Id,客户类型为2时,必填 qParams.add(new BasicNameValuePair("addressId", addressID)); // 地址Id,客户类型为2时,必填
signMap.put("addressId", addressID); signMap.put("addressId", addressID);
...@@ -541,8 +528,7 @@ public class IntelligenceSendOrder { ...@@ -541,8 +528,7 @@ public class IntelligenceSendOrder {
if (ORDERAMOUNT.equals("0.01") || ORDERAMOUNT.equals("0.02")) { if (ORDERAMOUNT.equals("0.01") || ORDERAMOUNT.equals("0.02")) {
paymentMap.put("payType", "2"); paymentMap.put("payType", "2");
} else { } else {
paymentMap.put( paymentMap.put("payType", "4"); // 缴费方式,必填(例:payType:1);1:银行划账2:现金支付3:代理商打款4:穗易付5:原套餐缴费方式6:支付宝划扣8:装维上门收取
"payType", "4"); // 缴费方式,必填(例:payType:1);1:银行划账2:现金支付3:代理商打款4:穗易付5:原套餐缴费方式6:支付宝划扣8:装维上门收取
} }
if("xjzf".equals(orderMap.get("customerId"))) { if("xjzf".equals(orderMap.get("customerId"))) {
...@@ -550,9 +536,7 @@ public class IntelligenceSendOrder { ...@@ -550,9 +536,7 @@ public class IntelligenceSendOrder {
} }
paymentMap.put("tag", ""); // 费用项标识,选填 paymentMap.put("tag", ""); // 费用项标识,选填
paymentMap.put( paymentMap.put("bank", ""); // 缴费银行,缴费方式为“银行划账”时必填
"bank",
""); // 缴费银行,缴费方式为“银行划账”时必填
// :[中国银行|中国工商银行|中国农业银行|民生银行|招商银行|中信银行|商业银行|广东发展银行|光大银行|华夏银行|兴业银行|浦发银行|广州农村商业银行|广州银行|深圳发展银行|交通银行|中国建设银行|邮政储蓄] // :[中国银行|中国工商银行|中国农业银行|民生银行|招商银行|中信银行|商业银行|广东发展银行|光大银行|华夏银行|兴业银行|浦发银行|广州农村商业银行|广州银行|深圳发展银行|交通银行|中国建设银行|邮政储蓄]
paymentMap.put("bankNumber", ""); // 银行账号,缴费方式为“银行划账”时必填 paymentMap.put("bankNumber", ""); // 银行账号,缴费方式为“银行划账”时必填
paymentMap.put("bankOwner", ""); // //银行账号持有人,缴费方式为“银行划账”时必填 paymentMap.put("bankOwner", ""); // //银行账号持有人,缴费方式为“银行划账”时必填
...@@ -934,8 +918,7 @@ public class IntelligenceSendOrder { ...@@ -934,8 +918,7 @@ public class IntelligenceSendOrder {
Map<String, Object> schoolMap = new HashMap<>(); Map<String, Object> schoolMap = new HashMap<>();
List<Map<String, Object>> list1 = new ArrayList<>(); List<Map<String, Object>> list1 = new ArrayList<>();
List<Map<String, Object>> hehuoren_id = List<Map<String, Object>> hehuoren_id = universityInfoMapper.selectProductManager(order.getHehuorenId());
universityInfoMapper.selectProductManager(order.getHehuorenId());
if (hehuoren_id.size() > 0 && hehuoren_id.get(0).get("university_id") != null) { if (hehuoren_id.size() > 0 && hehuoren_id.get(0).get("university_id") != null) {
Wrapper<UniversityInfo> universityInfoWrapper = new EntityWrapper<>(); Wrapper<UniversityInfo> universityInfoWrapper = new EntityWrapper<>();
universityInfoWrapper.eq("university_id", hehuoren_id.get(0).get("university_id").toString()); universityInfoWrapper.eq("university_id", hehuoren_id.get(0).get("university_id").toString());
...@@ -953,11 +936,11 @@ public class IntelligenceSendOrder { ...@@ -953,11 +936,11 @@ public class IntelligenceSendOrder {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
String currentTimeStr = simpleDateFormat.format(new Date()); String currentTimeStr = simpleDateFormat.format(new Date());
if (order.getUserType().toString().equals("3")) { if (order.getUserType().toString().equals("3")) {
String UPTRANSEQ = ""; String UPTRANSEQ = "";//支付平台流水号
if (orderMap.get("uptranseq") != null) { if (orderMap.get("uptranseq") != null) {
UPTRANSEQ = orderMap.get("uptranseq").toString(); UPTRANSEQ = orderMap.get("uptranseq").toString();
} }
// 穗易付平台,支付流水号 // 产品价格
String ORDERAMOUNT = ""; String ORDERAMOUNT = "";
if (orderMap.get("webOrderAmount").toString().equals("0")) { if (orderMap.get("webOrderAmount").toString().equals("0")) {
ORDERAMOUNT = "0元"; ORDERAMOUNT = "0元";
...@@ -967,7 +950,7 @@ public class IntelligenceSendOrder { ...@@ -967,7 +950,7 @@ public class IntelligenceSendOrder {
setPriceIndex(schoolMap, orderMap, ORDERAMOUNT); setPriceIndex(schoolMap, orderMap, ORDERAMOUNT);
// 穗易付订单号
String ORDERREQTRANSEQ = ""; String ORDERREQTRANSEQ = "";
if (orderMap.get("orderReqtranSeq") != null) { if (orderMap.get("orderReqtranSeq") != null) {
ORDERREQTRANSEQ = orderMap.get("orderReqtranSeq").toString(); // 穗易付订单号 ORDERREQTRANSEQ = orderMap.get("orderReqtranSeq").toString(); // 穗易付订单号
...@@ -1111,20 +1094,20 @@ public class IntelligenceSendOrder { ...@@ -1111,20 +1094,20 @@ public class IntelligenceSendOrder {
new BasicNameValuePair("addressCity", "广州市")); // 报装地址-市 办理类型,若选择[新宽新移][新宽旧移],此项必填 new BasicNameValuePair("addressCity", "广州市")); // 报装地址-市 办理类型,若选择[新宽新移][新宽旧移],此项必填
signMap.put("addressCity", "广州市"); signMap.put("addressCity", "广州市");
String addressDistrict = null; String addressDistrict = null; //所在区域
String address = null; String address = null; //装机地址
String addressID = null; String addressID = null; //地址ID
String landId = null; String landId = null; //揽装工号
String universityTerminalType = null; String universityTerminalType = null; //允许上网终端类型
String universityUserCategory = null; String universityUserCategory = null; //用户类别
String universityUserType = null; String universityUserType = null; //用户类型
String universityMonthlyRentType = null; String universityMonthlyRentType = null; //月租类型
String universityChargingAttribute = null; String universityChargingAttribute = null; //计费属性
String universityOnlineNumber = null; String universityOnlineNumber = null; //最大在线数
String universityOneManTerminal = null; String universityOneManTerminal = null; //一人一号多终端:0否 1是
String universityIsFtthHub = null; String universityIsFtthHub = null; //是否FTTH+HUB:0否 1是
String universityExteriorLines = null; String universityExteriorLines = null; //外线方式
String universityChargeMode = null; String universityChargeMode = null; //收费模式
if (BeanUtil.isNotBlank(schoolMap)) { if (BeanUtil.isNotBlank(schoolMap)) {
addressDistrict = (String) schoolMap.get("universityRegion"); addressDistrict = (String) schoolMap.get("universityRegion");
address = (String) schoolMap.get("universityInstalledAddress"); address = (String) schoolMap.get("universityInstalledAddress");
......
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.winsun.utils;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
//智能平台5.0加密
public class ZnptSignUtils {
private static final char[] hexChars = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
private static final String MAC_NAME = "HmacSHA1";
private static final String ENCODING = "UTF-8";
private static final String macKey = "";
private final SecretKeySpec secretKey;
public ZnptSignUtils() {
try {
byte[] data = macKey.getBytes(ENCODING);
this.secretKey = new SecretKeySpec(data, MAC_NAME);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
private String toHex(byte[] bytes) {
StringBuilder sb = new StringBuilder();
for (byte aByte : bytes) {
sb.append(hexChars[(aByte >> 4) & 0xF]).append(hexChars[aByte & 0xF]);
}
return sb.toString();
}
/**
* @param message
* @return 生成签名串
* @throws UnsupportedEncodingException
* @throws NoSuchAlgorithmException
* @throws InvalidKeyException
*/
public String macSHA1(String message) throws
UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException {
Mac mac = Mac.getInstance(MAC_NAME);
mac.init(secretKey);
byte[] text = message.getBytes(ENCODING);
return "sha1=" + toHex(mac.doFinal(text));
}
}
\ No newline at end of file
...@@ -153,6 +153,12 @@ ...@@ -153,6 +153,12 @@
<if test="orderId != null and orderId != ''"> <if test="orderId != null and orderId != ''">
and order_id = #{orderId} and order_id = #{orderId}
</if> </if>
<if test="idCard != null and idCard != ''">
and id_card = #{idCard}
</if>
<if test="netNumber != null and netNumber != ''">
and net_number like concat(#{netNumber},'%')
</if>
<if test="hehuorenIds != null and hehuorenIds.size > 0"> <if test="hehuorenIds != null and hehuorenIds.size > 0">
and hehuoren_id in and hehuoren_id in
<foreach collection="hehuorenIds" item="hehuorenId" open="(" close=")" separator=","> <foreach collection="hehuorenIds" item="hehuorenId" open="(" close=")" separator=",">
...@@ -574,6 +580,9 @@ ...@@ -574,6 +580,9 @@
<if test="orderId != null and orderId != ''"> <if test="orderId != null and orderId != ''">
and order_id = #{orderId} and order_id = #{orderId}
</if> </if>
<if test="idCard != null and idCard != ''">
and id_card = #{idCard}
</if>
<if test="hehuorenIds != null and hehuorenIds.size > 0"> <if test="hehuorenIds != null and hehuorenIds.size > 0">
and hehuoren_id in and hehuoren_id in
<foreach collection="hehuorenIds" item="hehuorenId" open="(" close=")" separator=","> <foreach collection="hehuorenIds" item="hehuorenId" open="(" close=")" separator=",">
......
...@@ -561,7 +561,6 @@ public class OrderController extends BaseController { ...@@ -561,7 +561,6 @@ public class OrderController extends BaseController {
broadBandOrder.setPageStart((broadBandOrder.getPageNo() - 1) * broadBandOrder.getPageSize()); broadBandOrder.setPageStart((broadBandOrder.getPageNo() - 1) * broadBandOrder.getPageSize());
List<BroadBandOrder> broadBandOrders = orderMapper.selectBroadBandOrderList(page, broadBandOrder); List<BroadBandOrder> broadBandOrders = orderMapper.selectBroadBandOrderList(page, broadBandOrder);
page.setRecords(broadBandOrders); page.setRecords(broadBandOrders);
return ResponseData.success(page); return ResponseData.success(page);
} }
...@@ -1438,7 +1437,7 @@ public class OrderController extends BaseController { ...@@ -1438,7 +1437,7 @@ public class OrderController extends BaseController {
} }
ShiroUser user = getShiroUser(); ShiroUser user = getShiroUser();
// 当前是否有数据权限 // 当前是否有数据权限
boolean hasDataPermission = user.getRoleNames().stream().anyMatch(data -> StringUtils.equalsAny(data, "活动上单员", "数据管理员", "超级管理员", "快递公司")); boolean hasDataPermission = user.getRoleNames().stream().anyMatch(data -> StringUtils.equalsAny(data, "活动上单员", "数据管理员", "超级管理员", "快递公司","县分管理员(订单)"));
if (!hasDataPermission) { if (!hasDataPermission) {
return ResponseData.error("无数据权限!"); return ResponseData.error("无数据权限!");
} }
......
...@@ -136,6 +136,9 @@ public class RhPhoneController extends BaseController { ...@@ -136,6 +136,9 @@ public class RhPhoneController extends BaseController {
RhPhone rhPhone=new RhPhone(); RhPhone rhPhone=new RhPhone();
Map<String, Object> map = listMap.get(i); Map<String, Object> map = listMap.get(i);
rhPhone.setPhone(map.get("a").toString()); rhPhone.setPhone(map.get("a").toString());
Wrapper<RhPhone> wrapper = new EntityWrapper<>();
wrapper.eq("phone",rhPhone);
rhPhoneMapper.delete(wrapper);
rhPhoneMapper.insert(rhPhone); rhPhoneMapper.insert(rhPhone);
} }
return ResponseData.success(error.toString(), "导入完成"); return ResponseData.success(error.toString(), "导入完成");
......
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