提交代码

new-dev
胡锐 1 year ago
parent 95f98b2a21
commit 7c3791ac07
  1. 21
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  2. 167
      hai-service/src/main/java/com/hai/dao/BsMerPlatformNoMapper.java
  3. 7
      hai-service/src/main/java/com/hai/dao/BsMerPlatformNoMapperExt.java
  4. 472
      hai-service/src/main/java/com/hai/dao/BsMerPlatformNoSqlProvider.java
  5. 392
      hai-service/src/main/java/com/hai/entity/BsMerPlatformNo.java
  6. 1683
      hai-service/src/main/java/com/hai/entity/BsMerPlatformNoExample.java
  7. 4
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  8. 7
      hai-service/src/main/java/com/hai/service/HighOrderService.java
  9. 116
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  10. 2
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -17,10 +17,7 @@ import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.common.utils.WxUtils;
import com.hai.config.HuiLianTongUnionCardConfig;
import com.hai.entity.HighOrder;
import com.hai.entity.HighTyAgent;
import com.hai.entity.HighTySalesman;
import com.hai.entity.OutRechargeOrder;
import com.hai.entity.*;
import com.hai.enum_type.UserObjectTypeEnum;
import com.hai.model.*;
import com.hai.service.*;
@ -57,6 +54,9 @@ public class HighOrderController {
@Resource
private HighOrderService highOrderService;
@Resource
private HighGasOrderService gasOrderService;
@Resource
private HighCouponService couponService;
@ -80,15 +80,18 @@ public class HighOrderController {
HighOrder order = highOrderService.getOrderById(orderId);
if (order == null) {
log.error("HighCouponController -> getCouponList() error!","权限不足");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
}
HighGasOrder gasOrder = gasOrderService.getDetailByOrderNo(order.getOrderNo());
if (gasOrder == null) {
log.error("HighCouponController -> getCouponList() error!","权限不足");
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_ORDER, "");
}
/* order.setPrintStatus(true);
order.setPrintNum(order.getPrintNum() + 1);*/
highOrderService.updateOrderDetail(order);
// 1. 热敏打印机 2. 云打印机
if (printType == 2) {
highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), order, true);
highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), gasOrder, true);
}
return ResponseMsgUtil.success("操作成功");

@ -0,0 +1,167 @@
package com.hai.dao;
import com.hai.entity.BsMerPlatformNo;
import com.hai.entity.BsMerPlatformNoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface BsMerPlatformNoMapper extends BsMerPlatformNoMapperExt {
@SelectProvider(type=BsMerPlatformNoSqlProvider.class, method="countByExample")
long countByExample(BsMerPlatformNoExample example);
@DeleteProvider(type=BsMerPlatformNoSqlProvider.class, method="deleteByExample")
int deleteByExample(BsMerPlatformNoExample example);
@Delete({
"delete from bs_mer_platform_no",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_mer_platform_no (company_id, agent_id, ",
"mer_id, mer_no, platform_type, ",
"platform_no, cup_no, ",
"pos_id, branch_id, ",
"mer_public_key, platform_operator_id, ",
"platform_operator_pwd, refund_cert_url, ",
"refund_cert_pwd, `status`, ",
"suggestion_reject, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, #{platformType,jdbcType=INTEGER}, ",
"#{platformNo,jdbcType=VARCHAR}, #{cupNo,jdbcType=VARCHAR}, ",
"#{posId,jdbcType=VARCHAR}, #{branchId,jdbcType=VARCHAR}, ",
"#{merPublicKey,jdbcType=VARCHAR}, #{platformOperatorId,jdbcType=VARCHAR}, ",
"#{platformOperatorPwd,jdbcType=VARCHAR}, #{refundCertUrl,jdbcType=VARCHAR}, ",
"#{refundCertPwd,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{suggestionReject,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMerPlatformNo record);
@InsertProvider(type=BsMerPlatformNoSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsMerPlatformNo record);
@SelectProvider(type=BsMerPlatformNoSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pos_id", property="posId", jdbcType=JdbcType.VARCHAR),
@Result(column="branch_id", property="branchId", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_public_key", property="merPublicKey", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_operator_id", property="platformOperatorId", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_operator_pwd", property="platformOperatorPwd", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_cert_url", property="refundCertUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_cert_pwd", property="refundCertPwd", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="suggestion_reject", property="suggestionReject", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<BsMerPlatformNo> selectByExample(BsMerPlatformNoExample example);
@Select({
"select",
"id, company_id, agent_id, mer_id, mer_no, platform_type, platform_no, cup_no, ",
"pos_id, branch_id, mer_public_key, platform_operator_id, platform_operator_pwd, ",
"refund_cert_url, refund_cert_pwd, `status`, suggestion_reject, create_time, ",
"update_time, ext_1, ext_2, ext_3",
"from bs_mer_platform_no",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pos_id", property="posId", jdbcType=JdbcType.VARCHAR),
@Result(column="branch_id", property="branchId", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_public_key", property="merPublicKey", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_operator_id", property="platformOperatorId", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_operator_pwd", property="platformOperatorPwd", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_cert_url", property="refundCertUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_cert_pwd", property="refundCertPwd", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="suggestion_reject", property="suggestionReject", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
BsMerPlatformNo selectByPrimaryKey(Long id);
@UpdateProvider(type=BsMerPlatformNoSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsMerPlatformNo record, @Param("example") BsMerPlatformNoExample example);
@UpdateProvider(type=BsMerPlatformNoSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsMerPlatformNo record, @Param("example") BsMerPlatformNoExample example);
@UpdateProvider(type=BsMerPlatformNoSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsMerPlatformNo record);
@Update({
"update bs_mer_platform_no",
"set company_id = #{companyId,jdbcType=BIGINT},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_no = #{merNo,jdbcType=VARCHAR},",
"platform_type = #{platformType,jdbcType=INTEGER},",
"platform_no = #{platformNo,jdbcType=VARCHAR},",
"cup_no = #{cupNo,jdbcType=VARCHAR},",
"pos_id = #{posId,jdbcType=VARCHAR},",
"branch_id = #{branchId,jdbcType=VARCHAR},",
"mer_public_key = #{merPublicKey,jdbcType=VARCHAR},",
"platform_operator_id = #{platformOperatorId,jdbcType=VARCHAR},",
"platform_operator_pwd = #{platformOperatorPwd,jdbcType=VARCHAR},",
"refund_cert_url = #{refundCertUrl,jdbcType=VARCHAR},",
"refund_cert_pwd = #{refundCertPwd,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"suggestion_reject = #{suggestionReject,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsMerPlatformNo record);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface BsMerPlatformNoMapperExt {
}

@ -0,0 +1,472 @@
package com.hai.dao;
import com.hai.entity.BsMerPlatformNo;
import com.hai.entity.BsMerPlatformNoExample.Criteria;
import com.hai.entity.BsMerPlatformNoExample.Criterion;
import com.hai.entity.BsMerPlatformNoExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsMerPlatformNoSqlProvider {
public String countByExample(BsMerPlatformNoExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_mer_platform_no");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsMerPlatformNoExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_mer_platform_no");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsMerPlatformNo record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_mer_platform_no");
if (record.getCompanyId() != null) {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.VALUES("platform_no", "#{platformNo,jdbcType=VARCHAR}");
}
if (record.getCupNo() != null) {
sql.VALUES("cup_no", "#{cupNo,jdbcType=VARCHAR}");
}
if (record.getPosId() != null) {
sql.VALUES("pos_id", "#{posId,jdbcType=VARCHAR}");
}
if (record.getBranchId() != null) {
sql.VALUES("branch_id", "#{branchId,jdbcType=VARCHAR}");
}
if (record.getMerPublicKey() != null) {
sql.VALUES("mer_public_key", "#{merPublicKey,jdbcType=VARCHAR}");
}
if (record.getPlatformOperatorId() != null) {
sql.VALUES("platform_operator_id", "#{platformOperatorId,jdbcType=VARCHAR}");
}
if (record.getPlatformOperatorPwd() != null) {
sql.VALUES("platform_operator_pwd", "#{platformOperatorPwd,jdbcType=VARCHAR}");
}
if (record.getRefundCertUrl() != null) {
sql.VALUES("refund_cert_url", "#{refundCertUrl,jdbcType=VARCHAR}");
}
if (record.getRefundCertPwd() != null) {
sql.VALUES("refund_cert_pwd", "#{refundCertPwd,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getSuggestionReject() != null) {
sql.VALUES("suggestion_reject", "#{suggestionReject,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(BsMerPlatformNoExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("company_id");
sql.SELECT("agent_id");
sql.SELECT("mer_id");
sql.SELECT("mer_no");
sql.SELECT("platform_type");
sql.SELECT("platform_no");
sql.SELECT("cup_no");
sql.SELECT("pos_id");
sql.SELECT("branch_id");
sql.SELECT("mer_public_key");
sql.SELECT("platform_operator_id");
sql.SELECT("platform_operator_pwd");
sql.SELECT("refund_cert_url");
sql.SELECT("refund_cert_pwd");
sql.SELECT("`status`");
sql.SELECT("suggestion_reject");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_mer_platform_no");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
BsMerPlatformNo record = (BsMerPlatformNo) parameter.get("record");
BsMerPlatformNoExample example = (BsMerPlatformNoExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_mer_platform_no");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
}
if (record.getCupNo() != null) {
sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}");
}
if (record.getPosId() != null) {
sql.SET("pos_id = #{record.posId,jdbcType=VARCHAR}");
}
if (record.getBranchId() != null) {
sql.SET("branch_id = #{record.branchId,jdbcType=VARCHAR}");
}
if (record.getMerPublicKey() != null) {
sql.SET("mer_public_key = #{record.merPublicKey,jdbcType=VARCHAR}");
}
if (record.getPlatformOperatorId() != null) {
sql.SET("platform_operator_id = #{record.platformOperatorId,jdbcType=VARCHAR}");
}
if (record.getPlatformOperatorPwd() != null) {
sql.SET("platform_operator_pwd = #{record.platformOperatorPwd,jdbcType=VARCHAR}");
}
if (record.getRefundCertUrl() != null) {
sql.SET("refund_cert_url = #{record.refundCertUrl,jdbcType=VARCHAR}");
}
if (record.getRefundCertPwd() != null) {
sql.SET("refund_cert_pwd = #{record.refundCertPwd,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getSuggestionReject() != null) {
sql.SET("suggestion_reject = #{record.suggestionReject,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("bs_mer_platform_no");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}");
sql.SET("pos_id = #{record.posId,jdbcType=VARCHAR}");
sql.SET("branch_id = #{record.branchId,jdbcType=VARCHAR}");
sql.SET("mer_public_key = #{record.merPublicKey,jdbcType=VARCHAR}");
sql.SET("platform_operator_id = #{record.platformOperatorId,jdbcType=VARCHAR}");
sql.SET("platform_operator_pwd = #{record.platformOperatorPwd,jdbcType=VARCHAR}");
sql.SET("refund_cert_url = #{record.refundCertUrl,jdbcType=VARCHAR}");
sql.SET("refund_cert_pwd = #{record.refundCertPwd,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("suggestion_reject = #{record.suggestionReject,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
BsMerPlatformNoExample example = (BsMerPlatformNoExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsMerPlatformNo record) {
SQL sql = new SQL();
sql.UPDATE("bs_mer_platform_no");
if (record.getCompanyId() != null) {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.SET("platform_no = #{platformNo,jdbcType=VARCHAR}");
}
if (record.getCupNo() != null) {
sql.SET("cup_no = #{cupNo,jdbcType=VARCHAR}");
}
if (record.getPosId() != null) {
sql.SET("pos_id = #{posId,jdbcType=VARCHAR}");
}
if (record.getBranchId() != null) {
sql.SET("branch_id = #{branchId,jdbcType=VARCHAR}");
}
if (record.getMerPublicKey() != null) {
sql.SET("mer_public_key = #{merPublicKey,jdbcType=VARCHAR}");
}
if (record.getPlatformOperatorId() != null) {
sql.SET("platform_operator_id = #{platformOperatorId,jdbcType=VARCHAR}");
}
if (record.getPlatformOperatorPwd() != null) {
sql.SET("platform_operator_pwd = #{platformOperatorPwd,jdbcType=VARCHAR}");
}
if (record.getRefundCertUrl() != null) {
sql.SET("refund_cert_url = #{refundCertUrl,jdbcType=VARCHAR}");
}
if (record.getRefundCertPwd() != null) {
sql.SET("refund_cert_pwd = #{refundCertPwd,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getSuggestionReject() != null) {
sql.SET("suggestion_reject = #{suggestionReject,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, BsMerPlatformNoExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,392 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* bs_mer_platform_no
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsMerPlatformNo implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 公司id
*/
private Long companyId;
/**
* 代理商id
*/
private Long agentId;
/**
* 商户id
*/
private Long merId;
/**
* 内部商户号
*/
private String merNo;
/**
* 平台 1拉卡拉
*/
private Integer platformType;
/**
* 平台商户号
*/
private String platformNo;
/**
* 银联商户号
*/
private String cupNo;
/**
* 柜台号
*/
private String posId;
/**
* 分行号
*/
private String branchId;
/**
* 商户公钥
*/
private String merPublicKey;
/**
* 平台操作人员编号
*/
private String platformOperatorId;
/**
* 平台操作人员密码
*/
private String platformOperatorPwd;
/**
* 退款证书地址
*/
private String refundCertUrl;
/**
* 退款证书秘钥
*/
private String refundCertPwd;
/**
* 状态 0不可用 1可用 2 审核中 3审核驳回
*/
private Integer status;
/**
* 审核驳回原因
*/
private String suggestionReject;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Long getAgentId() {
return agentId;
}
public void setAgentId(Long agentId) {
this.agentId = agentId;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public String getMerNo() {
return merNo;
}
public void setMerNo(String merNo) {
this.merNo = merNo;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformNo() {
return platformNo;
}
public void setPlatformNo(String platformNo) {
this.platformNo = platformNo;
}
public String getCupNo() {
return cupNo;
}
public void setCupNo(String cupNo) {
this.cupNo = cupNo;
}
public String getPosId() {
return posId;
}
public void setPosId(String posId) {
this.posId = posId;
}
public String getBranchId() {
return branchId;
}
public void setBranchId(String branchId) {
this.branchId = branchId;
}
public String getMerPublicKey() {
return merPublicKey;
}
public void setMerPublicKey(String merPublicKey) {
this.merPublicKey = merPublicKey;
}
public String getPlatformOperatorId() {
return platformOperatorId;
}
public void setPlatformOperatorId(String platformOperatorId) {
this.platformOperatorId = platformOperatorId;
}
public String getPlatformOperatorPwd() {
return platformOperatorPwd;
}
public void setPlatformOperatorPwd(String platformOperatorPwd) {
this.platformOperatorPwd = platformOperatorPwd;
}
public String getRefundCertUrl() {
return refundCertUrl;
}
public void setRefundCertUrl(String refundCertUrl) {
this.refundCertUrl = refundCertUrl;
}
public String getRefundCertPwd() {
return refundCertPwd;
}
public void setRefundCertPwd(String refundCertPwd) {
this.refundCertPwd = refundCertPwd;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getSuggestionReject() {
return suggestionReject;
}
public void setSuggestionReject(String suggestionReject) {
this.suggestionReject = suggestionReject;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
BsMerPlatformNo other = (BsMerPlatformNo) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo()))
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType()))
&& (this.getPlatformNo() == null ? other.getPlatformNo() == null : this.getPlatformNo().equals(other.getPlatformNo()))
&& (this.getCupNo() == null ? other.getCupNo() == null : this.getCupNo().equals(other.getCupNo()))
&& (this.getPosId() == null ? other.getPosId() == null : this.getPosId().equals(other.getPosId()))
&& (this.getBranchId() == null ? other.getBranchId() == null : this.getBranchId().equals(other.getBranchId()))
&& (this.getMerPublicKey() == null ? other.getMerPublicKey() == null : this.getMerPublicKey().equals(other.getMerPublicKey()))
&& (this.getPlatformOperatorId() == null ? other.getPlatformOperatorId() == null : this.getPlatformOperatorId().equals(other.getPlatformOperatorId()))
&& (this.getPlatformOperatorPwd() == null ? other.getPlatformOperatorPwd() == null : this.getPlatformOperatorPwd().equals(other.getPlatformOperatorPwd()))
&& (this.getRefundCertUrl() == null ? other.getRefundCertUrl() == null : this.getRefundCertUrl().equals(other.getRefundCertUrl()))
&& (this.getRefundCertPwd() == null ? other.getRefundCertPwd() == null : this.getRefundCertPwd().equals(other.getRefundCertPwd()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getSuggestionReject() == null ? other.getSuggestionReject() == null : this.getSuggestionReject().equals(other.getSuggestionReject()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode());
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode());
result = prime * result + ((getPlatformNo() == null) ? 0 : getPlatformNo().hashCode());
result = prime * result + ((getCupNo() == null) ? 0 : getCupNo().hashCode());
result = prime * result + ((getPosId() == null) ? 0 : getPosId().hashCode());
result = prime * result + ((getBranchId() == null) ? 0 : getBranchId().hashCode());
result = prime * result + ((getMerPublicKey() == null) ? 0 : getMerPublicKey().hashCode());
result = prime * result + ((getPlatformOperatorId() == null) ? 0 : getPlatformOperatorId().hashCode());
result = prime * result + ((getPlatformOperatorPwd() == null) ? 0 : getPlatformOperatorPwd().hashCode());
result = prime * result + ((getRefundCertUrl() == null) ? 0 : getRefundCertUrl().hashCode());
result = prime * result + ((getRefundCertPwd() == null) ? 0 : getRefundCertPwd().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getSuggestionReject() == null) ? 0 : getSuggestionReject().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", companyId=").append(companyId);
sb.append(", agentId=").append(agentId);
sb.append(", merId=").append(merId);
sb.append(", merNo=").append(merNo);
sb.append(", platformType=").append(platformType);
sb.append(", platformNo=").append(platformNo);
sb.append(", cupNo=").append(cupNo);
sb.append(", posId=").append(posId);
sb.append(", branchId=").append(branchId);
sb.append(", merPublicKey=").append(merPublicKey);
sb.append(", platformOperatorId=").append(platformOperatorId);
sb.append(", platformOperatorPwd=").append(platformOperatorPwd);
sb.append(", refundCertUrl=").append(refundCertUrl);
sb.append(", refundCertPwd=").append(refundCertPwd);
sb.append(", status=").append(status);
sb.append(", suggestionReject=").append(suggestionReject);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -117,6 +117,9 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
@Resource
private ApiBlxCouponService apiBlxCouponService;
@Resource
private HighOrderService highOrderService;
@Override
public HighOrder orderPaySuccessHandle(String orderNo, OrderPayType payType, String paySerialNo, BigDecimal payRealPrice, HighUserCard userCard) {
@ -326,6 +329,7 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
// 扣预存款
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam);
}
highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), gasOrder, false);
} else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type2.getNumber())) {
// 推送团油订单

@ -1,10 +1,7 @@
package com.hai.service;
import com.alibaba.fastjson.JSONObject;
import com.hai.entity.HighChildOrder;
import com.hai.entity.HighOrder;
import com.hai.entity.HighUserCard;
import com.hai.entity.OutRechargeOrder;
import com.hai.entity.*;
import com.hai.model.*;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
@ -479,7 +476,7 @@ public interface HighOrderService {
* 打印加油订单
* @param gasId
*/
void printGasOrder(Long gasId, HighOrder order, boolean makeUp);
void printGasOrder(Long gasId, HighGasOrder order, boolean makeUp);
/**
* @Author Sum1Dream

@ -1368,71 +1368,93 @@ public class HighOrderServiceImpl implements HighOrderService {
}
@Override
public void printGasOrder(Long gasId, HighOrder order, boolean makeUp) {
public void printGasOrder(Long gasId, HighGasOrder order, boolean makeUp) {
if (order == null) {
return;
}
// 查询油站云打印设备
List<HighDevice> deviceList = deviceService.getDeviceListByStoreId(gasId);
for (HighDevice device : deviceList) {
Map<String, Object> receiptMap = new HashMap<>();
receiptMap.put("receiptTop", device.getReceiptTop());
receiptMap.put("receiptSource", device.getReceiptSource());
receiptMap.put("receiptBottom", device.getReceiptBottom());
if (device.getType().equals(DeviceTypeEnum.type1.getType())) {
new Thread(() -> {
try {
SpPrinterConfig sp = new SpPrinterConfig();
sp.print(device.getDeviceSn(),
SpPrinterTemplate.oilCashierStubTemp(
order.getStoreName(),
order.getOrderNo(),
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"),
order.getMemPhone(),
order.getGasGunNo(),
order.getGasOilNo(),
order.getGasOilLiters().toString(),
order.getGasRefuelPrice().toString(),
receiptMap,
makeUp
), 1);
sp.print(device.getDeviceSn(),
SpPrinterTemplate.oilClientStubTemp(
order.getStoreName(),
order.getOrderNo(),
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"),
order.getMemPhone(),
order.getGasGunNo(),
order.getGasOilNo(),
order.getGasOilLiters().toString(),
order.getGasRefuelPrice().toString(),
receiptMap,
makeUp
), 1);
} catch (Exception e) {
e.printStackTrace();
}
}).start();
}
/* for (HighChildOrder childOrder : order.getHighChildOrderList()) {
if (childOrder.getGoodsType().equals(3)) {
// 查询油站云打印设备
List<HighDevice> deviceList = deviceService.getDeviceListByStoreId(gasId);
for (HighDevice device : deviceList) {
Map<String, Object> receiptMap = new HashMap<>();
receiptMap.put("receiptTop", device.getReceiptTop());
receiptMap.put("receiptSource", device.getReceiptSource());
receiptMap.put("receiptBottom", device.getReceiptBottom());
if (device.getType().equals(DeviceTypeEnum.type1.getType())) {
new Thread(() -> {
try {
SpPrinterConfig sp = new SpPrinterConfig();
String printStr = SpPrinterTemplate.oilCashierStubTemp(
childOrder.getGoodsName(),
if (device.getType().equals(DeviceTypeEnum.type2.getType())) {
new Thread(() -> {
try {
mqttProviderConfig.publish(2, false, device.getDeviceImei(),
ZkcPrinterTemplate.oilCashierStubTemp(
order.getStoreName(),
order.getOrderNo(),
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"),
order.getMemPhone(),
childOrder.getGasGunNo(),
childOrder.getGasOilNo(),
childOrder.getGasOilLiters().toString(),
order.getTotalPrice().toString(),
"嗨森逛",
order.getGasGunNo(),
order.getGasOilNo(),
order.getGasOilLiters().toString(),
order.getGasRefuelPrice().toString(),
receiptMap,
makeUp
);
sp.print(device.getDeviceSn(), printStr, 1);
} catch (Exception e) {
e.printStackTrace();
}
}).start();
}
if (device.getType().equals(DeviceTypeEnum.type2.getType())) {
new Thread(() -> {
try {
mqttProviderConfig.publish(2, false, device.getDeviceImei(),
ZkcPrinterTemplate.oilCashierStubTemp(
childOrder.getGoodsName(),
));
mqttProviderConfig.publish(2, false, device.getDeviceImei(),
ZkcPrinterTemplate.oilClientStubTemp(
order.getStoreName(),
order.getOrderNo(),
DateUtil.date2String(order.getPayTime(), "yyyy-MM-dd HH:mm:ss"),
order.getMemPhone(),
"嗨森逛",
childOrder.getGasGunNo(),
childOrder.getGasOilNo(),
childOrder.getGasOilLiters().toString(),
order.getTotalPrice().toString(),
order.getGasGunNo(),
order.getGasOilNo(),
order.getGasOilLiters().toString(),
order.getGasRefuelPrice().toString(),
receiptMap,
makeUp
));
} catch (Exception e) {
e.getMessage();
}
}).start();
} catch (Exception e) {
e.getMessage();
}
}
}).start();
}
}*/
}
}
public String priceName(Integer num) {

@ -509,7 +509,7 @@ public class GoodsOrderServiceImpl implements PayService {
}).start();
}
}
highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), order, false);
// highOrderService.printGasOrder(order.getHighChildOrderList().get(0).getGoodsId(), order, false);
} catch (Exception e) {
}

Loading…
Cancel
Save