Merge branch 'dev' of http://gitea.dctpay.com/hurui/puhui-go into dev
commit
ea681a0984
@ -0,0 +1,52 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
|
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
import com.hfkj.common.utils.OrderUtil; |
||||
import com.hfkj.common.utils.ResponseMsgUtil; |
||||
import com.hfkj.model.ResponseData; |
||||
import com.hfkj.service.hlt.HltCanteenService; |
||||
import com.hfkj.service.hlt.HuiLianTongUnionCardService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
|
||||
@Controller |
||||
@RequestMapping(value="/test") |
||||
@Api(value="测试") |
||||
public class TestController { |
||||
private static Logger log = LoggerFactory.getLogger(TestController.class); |
||||
|
||||
@RequestMapping(value="/canteenConsume",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "食堂消费") |
||||
public ResponseData canteenConsume(@RequestParam(value = "cardNo" , required = false) String cardNo, |
||||
@RequestParam(value = "instCode" , required = false) String instCode, |
||||
@RequestParam(value = "canteenId" , required = false) String canteenId) { |
||||
try { |
||||
|
||||
String orderNo = OrderUtil.generateOrderNo(); |
||||
|
||||
JSONObject cardInfo = HltCanteenService.canteenConsume(orderNo , cardNo , instCode , canteenId); |
||||
if (StringUtils.isBlank(cardInfo.getString("data"))) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败"); |
||||
} |
||||
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(cardInfo.getString("data"))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
@ -1,2 +1,2 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
fileUrl=/home/project/phg/filesystem |
||||
cmsPath=/home/project/phg/filesystem/cmsPath |
||||
|
@ -0,0 +1,76 @@ |
||||
package com.cweb.controller.hlt; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
import com.hfkj.common.utils.OrderUtil; |
||||
import com.hfkj.common.utils.ResponseMsgUtil; |
||||
import com.hfkj.model.ResponseData; |
||||
import com.hfkj.service.cms.CmsContentService; |
||||
import com.hfkj.service.hlt.HltCanteenService; |
||||
import com.hfkj.service.hlt.HuiLianTongUnionCardService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
@Controller |
||||
@RequestMapping(value="/hltCanteen") |
||||
@Api(value="汇联通食堂接口") |
||||
public class HltCanteenController { |
||||
|
||||
Logger log = LoggerFactory.getLogger(HltCanteenController.class); |
||||
|
||||
|
||||
@RequestMapping(value="/canteenConsume",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "食堂消费") |
||||
public ResponseData canteenConsume(@RequestParam(value = "cardNo" , required = false) String cardNo, |
||||
@RequestParam(value = "instCode" , required = false) String instCode, |
||||
@RequestParam(value = "canteenId" , required = false) String canteenId) { |
||||
try { |
||||
|
||||
String orderNo = OrderUtil.generateOrderNo(); |
||||
|
||||
JSONObject info = HltCanteenService.canteenConsume(orderNo , cardNo , instCode , canteenId); |
||||
if (StringUtils.isBlank(info.getString("data"))) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败"); |
||||
} |
||||
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(info.getString("data"))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
@RequestMapping(value="/queryCanteenOrder",method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "食堂消费记录") |
||||
public ResponseData queryCanteenOrder(@RequestParam(value = "cardNo" , required = false) String cardNo) { |
||||
try { |
||||
|
||||
JSONObject info = HltCanteenService.queryCanteenOrder(cardNo); |
||||
if (StringUtils.isBlank(info.getString("data"))) { |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败"); |
||||
} |
||||
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(info.getString("data"))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("error!",e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
} |
@ -1 +1 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
fileUrl=/home/project/phg/filesystem |
||||
|
@ -1,2 +1,2 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
fileUrl=/home/project/phg/filesystem |
||||
cmsPath=/home/project/phg/filesystem/cmsPath |
||||
|
@ -1,2 +1,2 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
fileUrl=/home/project/phg/filesystem |
||||
cmsPath=/home/project/phg/filesystem/cmsPath |
||||
|
@ -1,2 +1,2 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
fileUrl=/home/project/phg/filesystem |
||||
cmsPath=/home/project/phg/filesystem/cmsPath |
||||
|
@ -0,0 +1,47 @@ |
||||
package com.order.controller.notify; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
import javax.servlet.http.HttpServletRequest; |
||||
import javax.servlet.http.HttpServletResponse; |
||||
import java.io.PrintWriter; |
||||
|
||||
@Controller |
||||
@RequestMapping(value = "/etcNotify") |
||||
@Api(value = "etc通知") |
||||
public class EtcNotify { |
||||
private static final Logger log = LoggerFactory.getLogger(QzCinemaNotify.class); |
||||
|
||||
@RequestMapping(value = "/notify", method = RequestMethod.POST) |
||||
@ApiOperation(value = "回调") |
||||
@ResponseBody |
||||
public void notify(@RequestBody String reqBodyStr, HttpServletRequest request, HttpServletResponse response) { |
||||
try { |
||||
|
||||
JSONObject dataObject = JSONObject.parseObject(reqBodyStr, JSONObject.class); |
||||
|
||||
log.info("============回调任务Start============="); |
||||
log.info("尖椒订单充值-回调参数: " + dataObject); |
||||
log.info("============回调任务End============="); |
||||
|
||||
|
||||
response.setCharacterEncoding("UTF-8"); |
||||
response.setContentType("text/html;charset=utf-8"); |
||||
PrintWriter writer= response.getWriter(); |
||||
writer.write("SUCCESS"); |
||||
|
||||
|
||||
} catch (Exception e) { |
||||
log.error("WechatPayController --> wechatNotify() error!", e); |
||||
} |
||||
} |
||||
} |
@ -1,2 +1,2 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
fileUrl=/home/project/phg/filesystem |
||||
cmsPath=/home/project/phg/filesystem/cmsPath |
||||
|
@ -1,7 +1,299 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.*; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsOrderMapperExt { |
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_order (user_id, user_name, ", |
||||
"user_phone, order_no, ", |
||||
"pay_channel, pay_channel_order_no, ", |
||||
"pay_serial_no, pay_type, ", |
||||
"total_price, pay_real_price, ", |
||||
"product_total_price, create_time, ", |
||||
"update_time, pay_time, ", |
||||
"finish_time, cancel_time, ", |
||||
"refund_time, order_status, ", |
||||
"remarks, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.userId,jdbcType=BIGINT}, " + |
||||
"#{item.userName,jdbcType=VARCHAR}, ", |
||||
"#{item.userPhone,jdbcType=VARCHAR}, " + |
||||
"#{item.orderNo,jdbcType=VARCHAR}, ", |
||||
"#{item.payChannel,jdbcType=INTEGER}, " + |
||||
"#{item.payChannelOrderNo,jdbcType=VARCHAR}, ", |
||||
"#{item.paySerialNo,jdbcType=VARCHAR}, " + |
||||
"#{item.payType,jdbcType=INTEGER}, ", |
||||
"#{item.totalPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.payRealPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.productTotalPrice,jdbcType=DECIMAL}," + |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.payTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.finishTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.cancelTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.refundTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.orderStatus,jdbcType=INTEGER}, ", |
||||
"#{item.remarks,jdbcType=VARCHAR}, " + |
||||
"#{item.ext1,jdbcType=VARCHAR}, " + |
||||
"#{item.ext2,jdbcType=VARCHAR}, ", |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertOrderBatch(@Param(value = "list") List<BsOrder> list); |
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_order_child (order_no, child_order_no, ", |
||||
"mer_id, product_type, ", |
||||
"product_id, product_name, ", |
||||
"product_img, product_spec_id, ", |
||||
"product_spec_name, product_price, ", |
||||
"product_count, product_total_price, ", |
||||
"total_deduction_price, coupon_discount_price, ", |
||||
"integral_discount_price, product_actual_price, ", |
||||
"surplus_refund_count, surplus_refund_price, ", |
||||
"surplus_refund_integral, `status`, ", |
||||
"settle_account, settle_account_key, ", |
||||
"create_time, update_time, ", |
||||
"finish_time, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.orderNo,jdbcType=VARCHAR}, " + |
||||
"#{item.childOrderNo,jdbcType=VARCHAR}, ", |
||||
"#{item.merId,jdbcType=BIGINT}, " + |
||||
"#{item.productType,jdbcType=INTEGER}, ", |
||||
"#{item.productId,jdbcType=BIGINT}, " + |
||||
"#{item.productName,jdbcType=VARCHAR}, ", |
||||
"#{item.productImg,jdbcType=VARCHAR}, " + |
||||
"#{item.productSpecId,jdbcType=BIGINT}, ", |
||||
"#{item.productSpecName,jdbcType=VARCHAR}, " + |
||||
"#{item.productPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.productCount,jdbcType=INTEGER}, " + |
||||
"#{item.productTotalPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.integralDiscountPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.productActualPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.surplusRefundCount,jdbcType=INTEGER}, " + |
||||
"#{item.surplusRefundPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.surplusRefundIntegral,jdbcType=BIGINT}, " + |
||||
"#{item.status,jdbcType=INTEGER}, ", |
||||
"#{item.settleAccount,jdbcType=VARCHAR}," + |
||||
"#{item.settleAccountKey,jdbcType=VARCHAR}, ", |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.finishTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.ext1,jdbcType=VARCHAR}, ", |
||||
"#{item.ext2,jdbcType=VARCHAR}, " + |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertOrderChildBatch(@Param(value = "list") List<BsOrderChild> list); |
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_order_coupon (order_no, child_order_no, ", |
||||
"mer_id, user_id, user_phone, ", |
||||
"goods_id, goods_name, ", |
||||
"goods_type_id, goods_type_name, ", |
||||
"goods_brand_id, goods_brand_name, ", |
||||
"goods_specs_id, goods_specs_name, ", |
||||
"goods_spesc_original_price, goods_vpd_id, ", |
||||
"goods_vpd_key, goods_vpd_source, ", |
||||
"goods_count, total_price, ", |
||||
"total_deduction_price, coupon_discount_price, ", |
||||
"integral_discount_price, pay_real_price, ", |
||||
"pay_channel, pay_serial_no, ", |
||||
"pay_type, `status`, ", |
||||
"create_time, pay_time, ", |
||||
"cancel_time, refund_time, ", |
||||
"finish_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.orderNo,jdbcType=VARCHAR}, " + |
||||
"#{item.childOrderNo,jdbcType=VARCHAR}, ", |
||||
"#{item.merId,jdbcType=BIGINT}, " + |
||||
"#{item.userId,jdbcType=BIGINT}," + |
||||
"#{item.userPhone,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsId,jdbcType=BIGINT}, " + |
||||
"#{item.goodsName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsTypeId,jdbcType=BIGINT}, " + |
||||
"#{item.goodsTypeName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsBrandId,jdbcType=BIGINT}, " + |
||||
"#{item.goodsBrandName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsSpecsId,jdbcType=BIGINT}, " + |
||||
"#{item.goodsSpecsName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsSpescOriginalPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.goodsVpdId,jdbcType=BIGINT}, ", |
||||
"#{item.goodsVpdKey,jdbcType=VARCHAR}, " + |
||||
"#{item.goodsVpdSource,jdbcType=INTEGER}, ", |
||||
"#{item.goodsCount,jdbcType=INTEGER}, " + |
||||
"#{item.totalPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.integralDiscountPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.payRealPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.payChannel,jdbcType=INTEGER}, " + |
||||
"#{item.paySerialNo,jdbcType=VARCHAR}, ", |
||||
"#{item.payType,jdbcType=INTEGER}, " + |
||||
"#{item.status,jdbcType=INTEGER}, ", |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.payTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.cancelTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.refundTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.finishTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.ext1,jdbcType=VARCHAR}, " + |
||||
"#{item.ext2,jdbcType=VARCHAR}, " + |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertOrderCouponBatch(@Param(value = "list") List<BsOrderCoupon> list); |
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_order_coupon_no (coupon_order_id, order_no, ", |
||||
"channel_order_no, goods_vpd_source, ", |
||||
"goods_vpd_key, goods_vpd_source_cou_no, ", |
||||
"expire_status, expire_time, ", |
||||
"`status`, exception_status, ", |
||||
"create_time, deliver_time, ", |
||||
"finish_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.couponOrderId,jdbcType=BIGINT}, " + |
||||
"#{item.orderNo,jdbcType=VARCHAR}, ", |
||||
"#{item.channelOrderNo,jdbcType=VARCHAR}, " + |
||||
"#{item.goodsVpdSource,jdbcType=INTEGER}, ", |
||||
"#{item.goodsVpdKey,jdbcType=VARCHAR}, " + |
||||
"#{item.goodsVpdSourceCouNo,jdbcType=VARCHAR}, ", |
||||
"#{item.expireStatus,jdbcType=BIT}, " + |
||||
"#{item.expireTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.status,jdbcType=INTEGER}, " + |
||||
"#{item.exceptionStatus,jdbcType=BIT}, ", |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.deliverTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.finishTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.ext1,jdbcType=VARCHAR}, " + |
||||
"#{item.ext2,jdbcType=VARCHAR}, " + |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertOrderCouponNoBatch(@Param(value = "list") List<BsOrderCouponNo> list); |
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_order_goods (logistics_no, freight_price, ", |
||||
"delivery_address_id, delivery_address, ", |
||||
"order_no, child_order_no, ", |
||||
"mer_id, user_id, user_phone, ", |
||||
"goods_id, img, goods_name, ", |
||||
"goods_type_id, goods_type_name, ", |
||||
"goods_brand_id, goods_brand_name, ", |
||||
"goods_specs_id, goods_specs_name, ", |
||||
"goods_specs_original_price, goods_count, ", |
||||
"total_price, total_deduction_price, ", |
||||
"coupon_discount_price, integral_discount_price, ", |
||||
"pay_real_price, pay_channel, ", |
||||
"pay_serial_no, pay_type, ", |
||||
"`status`, logistics_status_desc, ", |
||||
"logistics_status, create_time, ", |
||||
"pay_time, cancel_time, ", |
||||
"refund_time, finish_time, ", |
||||
"update_time, exception_status, ", |
||||
"exception_msg, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.logisticsNo,jdbcType=VARCHAR}, " + |
||||
"#{item.freightPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.deliveryAddressId,jdbcType=BIGINT}, " + |
||||
"#{item.deliveryAddress,jdbcType=VARCHAR}, ", |
||||
"#{item.orderNo,jdbcType=VARCHAR}, " + |
||||
"#{item.childOrderNo,jdbcType=VARCHAR}, ", |
||||
"#{item.merId,jdbcType=BIGINT}, " + |
||||
"#{item.userId,jdbcType=BIGINT}, " + |
||||
"#{item.userPhone,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsId,jdbcType=BIGINT}, " + |
||||
"#{item.img,jdbcType=VARCHAR}, " + |
||||
"#{item.goodsName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsTypeId,jdbcType=BIGINT}, " + |
||||
"#{item.goodsTypeName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsBrandId,jdbcType=BIGINT}, " + |
||||
"#{item.goodsBrandName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsSpecsId,jdbcType=BIGINT}, " + |
||||
"#{item.goodsSpecsName,jdbcType=VARCHAR}, ", |
||||
"#{item.goodsSpecsOriginalPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.goodsCount,jdbcType=INTEGER}, ", |
||||
"#{item.totalPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.integralDiscountPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.payRealPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.payChannel,jdbcType=INTEGER}, ", |
||||
"#{item.paySerialNo,jdbcType=VARCHAR}, " + |
||||
"#{item.payType,jdbcType=INTEGER}, ", |
||||
"#{item.status,jdbcType=INTEGER}, " + |
||||
"#{item.logisticsStatusDesc,jdbcType=VARCHAR}, ", |
||||
"#{item.logisticsStatus,jdbcType=VARCHAR}, " + |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.payTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.cancelTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.refundTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.finishTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.exceptionStatus,jdbcType=BIT}, ", |
||||
"#{item.exceptionMsg,jdbcType=VARCHAR}, " + |
||||
"#{item.ext1,jdbcType=VARCHAR}, ", |
||||
"#{item.ext2,jdbcType=VARCHAR}, " + |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertOrderGoodsBatch(@Param(value = "list") List<BsOrderGoods> list); |
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_order_deduction (order_id, order_no, ", |
||||
"total_deduction_price, user_coupon_discount_id, ", |
||||
"coupon_discount_id, coupon_discount_type, ", |
||||
"coupon_discount_price, coupon_discount_actual_price, ", |
||||
"integral_discount_price, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.orderId,jdbcType=BIGINT}, " + |
||||
"#{item.orderNo,jdbcType=VARCHAR}, ", |
||||
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.userCouponDiscountId,jdbcType=BIGINT}, ", |
||||
"#{item.couponDiscountId,jdbcType=BIGINT}, " + |
||||
"#{item.couponDiscountType,jdbcType=INTEGER}, ", |
||||
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, " + |
||||
"#{item.couponDiscountActualPrice,jdbcType=DECIMAL}, ", |
||||
"#{item.integralDiscountPrice,jdbcType=BIGINT}, " + |
||||
"#{item.ext1,jdbcType=VARCHAR}, ", |
||||
"#{item.ext2,jdbcType=VARCHAR}, " + |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertOrderDeductionBatch(@Param(value = "list") List<BsOrderDeduction> list); |
||||
} |
@ -1,7 +1,56 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsUser; |
||||
import com.hfkj.entity.BsUserCard; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Update; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsUserCardMapperExt { |
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_user_card (user_id, `type`, ", |
||||
"card_no, `status`, ", |
||||
"create_time, ", |
||||
"update_time, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.userId,jdbcType=BIGINT}, " + |
||||
"#{item.type,jdbcType=INTEGER}, ", |
||||
"#{item.cardNo,jdbcType=VARCHAR}, " + |
||||
"#{item.status,jdbcType=INTEGER}, ", |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.ext1,jdbcType=VARCHAR}, ", |
||||
"#{item.ext2,jdbcType=VARCHAR}," + |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertUserCardList(@Param(value = "list") List<BsUserCard> list); |
||||
|
||||
@Update({ |
||||
"<script>", |
||||
"<foreach collection='list' item='item' separator=';'>", |
||||
"update bs_user_card set " + |
||||
"user_id = #{item.userId}, ", |
||||
"type = #{item.type}, " + |
||||
"card_no = #{item.cardNo}, ", |
||||
"status = #{item.status}, " + |
||||
"create_time = #{item.createTime}, ", |
||||
"update_time = #{item.updateTime}, " + |
||||
"ext_1 = #{item.ext1}, ", |
||||
"ext_2 = #{item.ext2}," + |
||||
"ext_3 = #{item.ext3} where id=#{item.id}", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void updateUserCardList(@Param(value = "list") List<BsUserCard> list); |
||||
} |
@ -1,7 +1,71 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
|
||||
import com.hfkj.entity.BsUser; |
||||
import com.hfkj.entity.BsUserCard; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Update; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsUserMapperExt { |
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into bs_user (head_img, `name`, ", |
||||
"phone, `password`, ", |
||||
"integral, `status`, ", |
||||
"wx_mp_openid, wx_ma_openid, ", |
||||
"outside_openid, create_time, ", |
||||
"update_time, ext_1, ", |
||||
"ext_2, ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.headImg,jdbcType=VARCHAR}, " + |
||||
"#{item.name,jdbcType=VARCHAR}, ", |
||||
"#{item.phone,jdbcType=VARCHAR}, " + |
||||
"#{item.password,jdbcType=VARCHAR}, ", |
||||
"#{item.integral,jdbcType=BIGINT}, " + |
||||
"#{item.status,jdbcType=INTEGER}, ", |
||||
"#{item.wxMpOpenid,jdbcType=VARCHAR}, " + |
||||
"#{item.wxMaOpenid,jdbcType=VARCHAR}, ", |
||||
"#{item.outsideOpenid,jdbcType=VARCHAR}, " + |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.ext1,jdbcType=VARCHAR}, ", |
||||
"#{item.ext2,jdbcType=VARCHAR}," + |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertUserList(@Param(value = "list") List<BsUser> list); |
||||
|
||||
|
||||
@Update({ |
||||
"<script>", |
||||
"<foreach collection='list' item='item' separator=';'>", |
||||
"update bs_user set " + |
||||
"head_img = #{item.headImg}, " + |
||||
"name = #{item.name}, ", |
||||
"phone = #{item.phone}, " + |
||||
"password = #{item.password}, ", |
||||
"integral = #{item.integral}, ", |
||||
"status = #{item.status}, " + |
||||
"wx_mp_openid = #{item.wxMpOpenid}, " + |
||||
"wx_ma_openid = #{item.wxMaOpenid}, " + |
||||
"outside_openid = #{item.outsideOpenid}, " + |
||||
"create_time = #{item.createTime}, ", |
||||
"update_time = #{item.updateTime}, " + |
||||
"ext_1 = #{item.ext1}, ", |
||||
"ext_2 = #{item.ext2}," + |
||||
"ext_3 = #{item.ext3} where id=#{item.id}", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void updateUserList(@Param(value = "list") List<BsUser> list); |
||||
|
||||
} |
@ -1,7 +1,45 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsUser; |
||||
import com.hfkj.entity.GoodsUserAddress; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface GoodsUserAddressMapperExt { |
||||
|
||||
|
||||
@Insert({ |
||||
"<script>", |
||||
"insert into goods_user_address (user_id, consignee, ", |
||||
"phone, address, ", |
||||
"region_id, region_name, ", |
||||
"whether_default, create_time, ", |
||||
"update_time, op_id, ", |
||||
"op_name, ext_1, ext_2, ", |
||||
"ext_3)", |
||||
"values ", |
||||
"<foreach collection='list' item='item' index='index' separator=','>", |
||||
"(#{item.userId,jdbcType=BIGINT}, " + |
||||
"#{item.consignee,jdbcType=VARCHAR}, ", |
||||
"#{item.phone,jdbcType=VARCHAR}, " + |
||||
"#{item.address,jdbcType=VARCHAR}, ", |
||||
"#{item.regionId,jdbcType=VARCHAR}, " + |
||||
"#{item.regionName,jdbcType=VARCHAR}, ", |
||||
"#{item.whetherDefault,jdbcType=BIT}, " + |
||||
"#{item.createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{item.updateTime,jdbcType=TIMESTAMP}, " + |
||||
"#{item.opId,jdbcType=BIGINT}, ", |
||||
"#{item.opName,jdbcType=VARCHAR}, " + |
||||
"#{item.ext1,jdbcType=VARCHAR}, " + |
||||
"#{item.ext2,jdbcType=VARCHAR}, ", |
||||
"#{item.ext3,jdbcType=VARCHAR})", |
||||
"</foreach>", |
||||
"</script>" |
||||
}) |
||||
void insertAddressList(@Param(value = "list") List<GoodsUserAddress> list); |
||||
} |
@ -0,0 +1,52 @@ |
||||
package com.hfkj.service.hlt; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @ClassName HltCanteenService |
||||
* @Author Sum1Dream |
||||
* @Description 汇联通食堂功能 |
||||
* @Date 2024/7/30 下午5:31 |
||||
**/ |
||||
public class HltCanteenService { |
||||
|
||||
/** |
||||
* @MethodName canteenConsume |
||||
* @Description: 食堂消费 |
||||
* @param orderNo |
||||
* @param cardNo |
||||
* @param instCode |
||||
* @param canteenId |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/7/30 下午5:36 |
||||
*/ |
||||
public static JSONObject canteenConsume(String orderNo , String cardNo , String instCode , String canteenId) throws Exception { |
||||
Map<String,Object> dataMap = new HashMap<>(); |
||||
dataMap.put("orderNo", orderNo); |
||||
dataMap.put("consumeType", 3); |
||||
dataMap.put("cardNo", cardNo); |
||||
dataMap.put("instCode", instCode); |
||||
dataMap.put("canteenId", canteenId); |
||||
return HuiLianTongUnionCardService.request("canteen/canteenConsume", dataMap); |
||||
} |
||||
|
||||
/** |
||||
* @MethodName queryCanteenOrder |
||||
* @Description:查询食堂消费记录 |
||||
* @param cardNo |
||||
* @return: com.alibaba.fastjson.JSONObject |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/7/30 下午5:38 |
||||
*/ |
||||
public static JSONObject queryCanteenOrder(String cardNo) throws Exception { |
||||
Map<String,Object> dataMap = new HashMap<>(); |
||||
dataMap.put("cardNo", cardNo); |
||||
dataMap.put("page", 1); |
||||
dataMap.put("pageSize", 100000); |
||||
return HuiLianTongUnionCardService.request("canteen/queryCanteenOrder", dataMap); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,42 @@ |
||||
package com.hfkj.service.user; |
||||
|
||||
import com.hfkj.entity.*; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
public interface PhgDataUserService { |
||||
|
||||
/** |
||||
* @MethodName queryDetail |
||||
* @Description: |
||||
* @param id |
||||
* @return: com.hfkj.entity.CyymallUser |
||||
* @Author: Sum1Dream |
||||
* @Date: 2024/7/22 下午3:29 |
||||
*/ |
||||
CyymallUser queryDetail(Integer id); |
||||
|
||||
|
||||
List<CyymallUser> getList(Map<String , Object> map); |
||||
|
||||
List<CyymallOrder> getListOrder(Map<String , Object> map); |
||||
|
||||
List<CyymallOrderDetail> getListOrderDetail(); |
||||
|
||||
CyymallOrderDetail getDetail(Integer id); |
||||
|
||||
List<CyymallAddress> getAddressList(); |
||||
|
||||
CyymallGoods findGoods(Integer id); |
||||
List<CyymallGoods> getListGoods(); |
||||
|
||||
void insertOrderBatch(List<BsOrder> list); |
||||
void insertOrderChildBatch(List<BsOrderChild> list); |
||||
void insertOrderCouponBatch(List<BsOrderCoupon> list); |
||||
void insertOrderCouponNoBatch(List<BsOrderCouponNo> list); |
||||
void insertOrderGoodsBatch(List<BsOrderGoods> list); |
||||
void insertOrderDeductionBatch(List<BsOrderDeduction> list); |
||||
|
||||
String downloadImage(String imageUrl); |
||||
} |
@ -0,0 +1,182 @@ |
||||
package com.hfkj.service.user.impl; |
||||
|
||||
import com.hfkj.common.obs.HuaWeiYunObs; |
||||
import com.hfkj.common.utils.DateUtil; |
||||
import com.hfkj.config.CommonSysConst; |
||||
import com.hfkj.dao.*; |
||||
import com.hfkj.entity.*; |
||||
import com.hfkj.service.user.PhgDataUserService; |
||||
import org.apache.commons.collections4.MapUtils; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.beans.factory.annotation.Qualifier; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.io.*; |
||||
import java.net.URL; |
||||
import java.net.URLConnection; |
||||
import java.util.*; |
||||
|
||||
@Service("phgDataUserService") |
||||
public class PhgDataUserServiceImpl implements PhgDataUserService { |
||||
|
||||
@Resource |
||||
private CyymallUserMapper cyymallUserMapper; |
||||
|
||||
@Resource |
||||
private CyymallOrderMapper cyymallOrderMapper; |
||||
|
||||
@Resource |
||||
private CyymallOrderDetailMapper cyymallOrderDetailMapper; |
||||
|
||||
@Resource |
||||
private CyymallAddressMapper cyymallAddressMapper; |
||||
|
||||
@Resource |
||||
private CyymallGoodsMapper cyymallGoodsMapper; |
||||
|
||||
@Resource |
||||
private BsOrderMapper orderMapper; |
||||
@Qualifier("bsOrderMapperExt") |
||||
|
||||
@Resource |
||||
private BsOrderMapperExt bsOrderMapperExt; |
||||
|
||||
@Override |
||||
public CyymallUser queryDetail(Integer id) { |
||||
return cyymallUserMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public List<CyymallUser> getList(Map<String, Object> map) { |
||||
|
||||
CyymallUserExample example = new CyymallUserExample(); |
||||
CyymallUserExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
|
||||
if (MapUtils.getShort(map, "type") != null) { |
||||
criteria.andTypeEqualTo(MapUtils.getShort(map, "type")); |
||||
} |
||||
return cyymallUserMapper.selectByExample(example); |
||||
} |
||||
|
||||
@Override |
||||
public List<CyymallOrder> getListOrder(Map<String, Object> map) { |
||||
|
||||
CyymallOrderExample example = new CyymallOrderExample(); |
||||
CyymallOrderExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
if (MapUtils.getLong(map, "userId") != null) { |
||||
criteria.andUserIdEqualTo(MapUtils.getInteger(map, "type")); |
||||
} |
||||
if (MapUtils.getShort(map, "isPay") != null) { |
||||
criteria.andIsPayEqualTo(MapUtils.getShort(map, "isPay")); |
||||
} |
||||
if (MapUtils.getShort(map, "applyDelete") != null) { |
||||
criteria.andApplyDeleteEqualTo(MapUtils.getShort(map, "applyDelete")); |
||||
} |
||||
return cyymallOrderMapper.selectByExample(example); |
||||
} |
||||
|
||||
@Override |
||||
public List<CyymallOrderDetail> getListOrderDetail() { |
||||
return cyymallOrderDetailMapper.selectByExample(new CyymallOrderDetailExample()); |
||||
} |
||||
|
||||
@Override |
||||
public CyymallOrderDetail getDetail(Integer id) { |
||||
return cyymallOrderDetailMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
@Override |
||||
public List<CyymallAddress> getAddressList() { |
||||
CyymallAddressExample example = new CyymallAddressExample(); |
||||
CyymallAddressExample.Criteria criteria = example.createCriteria(); |
||||
|
||||
return cyymallAddressMapper.selectByExample(example); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public CyymallGoods findGoods(Integer id) { |
||||
return cyymallGoodsMapper.selectByPrimaryKey(id); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<CyymallGoods> getListGoods() { |
||||
return cyymallGoodsMapper.selectByExample(new CyymallGoodsExample()); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public void insertOrderBatch(List<BsOrder> list) { |
||||
bsOrderMapperExt.insertOrderBatch(list); |
||||
} |
||||
|
||||
@Override |
||||
public void insertOrderChildBatch(List<BsOrderChild> list) { |
||||
bsOrderMapperExt.insertOrderChildBatch(list); |
||||
} |
||||
|
||||
@Override |
||||
public void insertOrderCouponBatch(List<BsOrderCoupon> list) { |
||||
bsOrderMapperExt.insertOrderCouponBatch(list); |
||||
} |
||||
|
||||
@Override |
||||
public void insertOrderCouponNoBatch(List<BsOrderCouponNo> list) { |
||||
bsOrderMapperExt.insertOrderCouponNoBatch(list); |
||||
} |
||||
|
||||
@Override |
||||
public void insertOrderGoodsBatch(List<BsOrderGoods> list) { |
||||
bsOrderMapperExt.insertOrderGoodsBatch(list); |
||||
} |
||||
|
||||
@Override |
||||
public void insertOrderDeductionBatch(List<BsOrderDeduction> list) { |
||||
bsOrderMapperExt.insertOrderDeductionBatch(list); |
||||
} |
||||
|
||||
@Override |
||||
public String downloadImage(String imageUrl) { |
||||
try { |
||||
URL url = new URL(imageUrl); |
||||
URLConnection connection = url.openConnection(); |
||||
InputStream inputStream = connection.getInputStream(); |
||||
BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream); |
||||
|
||||
|
||||
// 创建图片路径
|
||||
String fileName = System.currentTimeMillis() + ".png"; |
||||
String childPath = DateUtil.date2String(new Date(), "yyyyMM"); |
||||
String destDirName = CommonSysConst.getSysConfig().getFileUrl() + File.separator + childPath; |
||||
// 创建文件夹
|
||||
File dir = new File(destDirName); |
||||
if (!dir.exists()) { |
||||
dir.mkdirs(); |
||||
} |
||||
|
||||
FileOutputStream fileOutputStream = new FileOutputStream(destDirName + File.separator + fileName); |
||||
|
||||
byte[] buffer = new byte[1024]; |
||||
int bytesRead; |
||||
while ((bytesRead = bufferedInputStream.read(buffer)) != -1) { |
||||
fileOutputStream.write(buffer, 0, bytesRead); |
||||
fileOutputStream.flush(); |
||||
} |
||||
HuaWeiYunObs.putObject(CommonSysConst.getSysConfig().getObsBucketName(), |
||||
childPath + "/" + fileName, new File(destDirName + "/" + fileName)); |
||||
fileOutputStream.close(); |
||||
bufferedInputStream.close(); |
||||
inputStream.close(); |
||||
|
||||
return childPath + "/" + fileName; |
||||
} catch (IOException ioException) { |
||||
ioException.printStackTrace(); |
||||
} |
||||
return null; |
||||
|
||||
} |
||||
} |
@ -1,2 +1,2 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
fileUrl=/home/project/phg/filesystem |
||||
cmsPath=/home/project/phg/filesystem/cmsPath |
||||
|
Loading…
Reference in new issue