菠萝派接口- 修改订单备注、发货、商品下载调用新数据源
正在显示
11 个修改的文件
包含
701 行增加
和
28 行删除
| 1 | package com.sibu.orderHelper.mall.member.read; | 1 | package com.sibu.orderHelper.mall.member.read; |
| 2 | 2 | ||
| 3 | import com.sibu.orderHelper.integral.model.DownloadProductBean; | ||
| 4 | import com.sibu.orderHelper.integral.model.DownloadProductSkuBean; | ||
| 5 | import com.sibu.orderHelper.integral.model.IMSupplierApp; | ||
| 6 | import com.sibu.orderHelper.integral.pineapple.model.*; | ||
| 3 | import com.sibu.orderHelper.integral.reponse.MemberAddressResponse; | 7 | import com.sibu.orderHelper.integral.reponse.MemberAddressResponse; |
| 4 | import com.sibu.orderHelper.integral.request.MemberAddressAddRequest; | 8 | import com.sibu.orderHelper.integral.request.MemberAddressAddRequest; |
| 5 | import org.apache.ibatis.annotations.Param; | 9 | import org.apache.ibatis.annotations.Param; |
| ... | @@ -9,4 +13,111 @@ import java.util.Map; | ... | @@ -9,4 +13,111 @@ import java.util.Map; |
| 9 | 13 | ||
| 10 | public interface MemberReadDao { | 14 | public interface MemberReadDao { |
| 11 | Integer count(); | 15 | Integer count(); |
| 16 | |||
| 17 | |||
| 18 | IMSupplierApp findByAppIdAndAppType(Map<String, String> params); | ||
| 19 | /** | ||
| 20 | * 根据订单号查询订单信息 只查询不是主订单的订单 | ||
| 21 | * @param params | ||
| 22 | * @return | ||
| 23 | */ | ||
| 24 | Orders getOrdersByMap(Map<String,Object> params); | ||
| 25 | |||
| 26 | /** | ||
| 27 | * 查询该订单是否有该快递单号 | ||
| 28 | * @param params | ||
| 29 | * @return | ||
| 30 | */ | ||
| 31 | int checkLogisticsNumber(Map<String,Object> params); | ||
| 32 | |||
| 33 | /** | ||
| 34 | * 商品下载 | ||
| 35 | * @param params | ||
| 36 | * @return | ||
| 37 | */ | ||
| 38 | List<DownloadProductBean> downloadProductListByMap(Map<String,Object> params); | ||
| 39 | |||
| 40 | |||
| 41 | /** | ||
| 42 | * 商品下载总数量 | ||
| 43 | * @param params | ||
| 44 | * @return | ||
| 45 | */ | ||
| 46 | int countDownloadProductListByMap(Map<String,Object> params); | ||
| 47 | |||
| 48 | |||
| 49 | /** | ||
| 50 | * 根据条件查询商品 | ||
| 51 | * @param params | ||
| 52 | * @return | ||
| 53 | */ | ||
| 54 | DownloadProductBean getDownloadProductBeanByMap(Map<String,Object> params); | ||
| 55 | |||
| 56 | /** | ||
| 57 | * 根据商品ID获取该商品的所有SKU | ||
| 58 | * @param productId | ||
| 59 | * @return | ||
| 60 | */ | ||
| 61 | List<DownloadProductSkuBean> downloadSkuByProductId(@Param("productId") String productId); | ||
| 62 | |||
| 63 | /** | ||
| 64 | * 订单下载 | ||
| 65 | * @param params | ||
| 66 | * @return | ||
| 67 | */ | ||
| 68 | List<Orders> getOrdersList(Map<String,Object> params); | ||
| 69 | |||
| 70 | /** | ||
| 71 | * 子订单查询 | ||
| 72 | * @param orderSn | ||
| 73 | * @return | ||
| 74 | */ | ||
| 75 | List<OrdersProduct> getOrdersProductList(@Param("orderSn")String orderSn); | ||
| 76 | |||
| 77 | |||
| 78 | /** | ||
| 79 | * 根据条件查询省市级信息 | ||
| 80 | * @param params | ||
| 81 | * @return | ||
| 82 | */ | ||
| 83 | List<Regions> getRegionsByMap(Map<String,Object> params); | ||
| 84 | |||
| 85 | /** | ||
| 86 | * 根据id查询省市级信息 | ||
| 87 | * @param id | ||
| 88 | * @return | ||
| 89 | */ | ||
| 90 | Regions getRegionsById(@Param("id") Integer id); | ||
| 91 | |||
| 92 | |||
| 93 | /** | ||
| 94 | * 根据条件查询物流公司 | ||
| 95 | * @return | ||
| 96 | */ | ||
| 97 | List<CourierCompany> getCourierCompanyByName(Map<String,Object> params); | ||
| 98 | |||
| 99 | /** | ||
| 100 | * 根据订单号查询退货信息 | ||
| 101 | * @param orderSn | ||
| 102 | * @return | ||
| 103 | */ | ||
| 104 | List<MemberProductBack> getMemberProductBackByOrderSn(@Param("orderSn") String orderSn); | ||
| 105 | |||
| 106 | /** | ||
| 107 | * 根据订单号查询换货信息 | ||
| 108 | * @param orderSn | ||
| 109 | * @return | ||
| 110 | */ | ||
| 111 | List<MemberProductExchange> getMemberProductExchangeByOrderSn(@Param("orderSn") String orderSn); | ||
| 112 | |||
| 113 | |||
| 114 | /** | ||
| 115 | * 根据订单ID查询投诉表 | ||
| 116 | * @param id | ||
| 117 | * @return | ||
| 118 | */ | ||
| 119 | List<SellerComplaint> getSellerComplaintByOrderId(@Param("orderId") Integer id); | ||
| 120 | |||
| 121 | |||
| 122 | List<Seller> getSeller(@Param("id") String id); | ||
| 12 | } | 123 | } | ... | ... |
| 1 | package com.sibu.orderHelper.mall.member.write; | 1 | package com.sibu.orderHelper.mall.member.write; |
| 2 | 2 | ||
| 3 | import java.util.Map; | ||
| 4 | |||
| 3 | public interface MemberWriteDao { | 5 | public interface MemberWriteDao { |
| 4 | Integer count(); | 6 | Integer count(); |
| 7 | |||
| 8 | /** | ||
| 9 | * 修改订单备注 | ||
| 10 | * @param params | ||
| 11 | * @return | ||
| 12 | */ | ||
| 13 | int updateOdersRemark(Map<String,Object> params); | ||
| 14 | |||
| 15 | /** | ||
| 16 | * 订单发货更新订单状态与信息 | ||
| 17 | * @param params | ||
| 18 | * @return | ||
| 19 | */ | ||
| 20 | int updateOrdersState(Map<String,Object> params); | ||
| 21 | |||
| 22 | /** | ||
| 23 | * 根据条件更新sku库存 | ||
| 24 | * @param params | ||
| 25 | * @return | ||
| 26 | */ | ||
| 27 | int updateSkuStock(Map<String,Object> params); | ||
| 28 | |||
| 29 | /** | ||
| 30 | * 根据商品ID更新商品库存 | ||
| 31 | * @param params | ||
| 32 | * @return | ||
| 33 | */ | ||
| 34 | int updateProductStock(Map<String,Object> params); | ||
| 35 | |||
| 5 | } | 36 | } | ... | ... |
| ... | @@ -14,6 +14,7 @@ import com.sibu.orderHelper.integral.model.IMSupplier; | ... | @@ -14,6 +14,7 @@ import com.sibu.orderHelper.integral.model.IMSupplier; |
| 14 | import com.sibu.orderHelper.integral.model.IMSupplierApp; | 14 | import com.sibu.orderHelper.integral.model.IMSupplierApp; |
| 15 | import com.sibu.orderHelper.integral.pineapple.enums.SubErrorEnum; | 15 | import com.sibu.orderHelper.integral.pineapple.enums.SubErrorEnum; |
| 16 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; | 16 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
| 17 | import com.sibu.orderHelper.integral.pineapple.model.Seller; | ||
| 17 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; | 18 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; |
| 18 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 19 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 19 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; | 20 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; |
| ... | @@ -27,6 +28,7 @@ import com.sibu.orderHelper.integral.service.pineapple.BizService; | ... | @@ -27,6 +28,7 @@ import com.sibu.orderHelper.integral.service.pineapple.BizService; |
| 27 | import com.sibu.orderHelper.integral.service.pineapple.util.JsonUtils; | 28 | import com.sibu.orderHelper.integral.service.pineapple.util.JsonUtils; |
| 28 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; | 29 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; |
| 29 | import com.sibu.orderHelper.integral.service.pineapple.util.XmlUtils; | 30 | import com.sibu.orderHelper.integral.service.pineapple.util.XmlUtils; |
| 31 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 30 | import net.sf.json.JSONObject; | 32 | import net.sf.json.JSONObject; |
| 31 | import org.apache.commons.collections.CollectionUtils; | 33 | import org.apache.commons.collections.CollectionUtils; |
| 32 | import org.apache.commons.lang3.StringUtils; | 34 | import org.apache.commons.lang3.StringUtils; |
| ... | @@ -67,6 +69,8 @@ public class PineappleController { | ... | @@ -67,6 +69,8 @@ public class PineappleController { |
| 67 | private IMSupplierAppService imSupplierAppService; | 69 | private IMSupplierAppService imSupplierAppService; |
| 68 | @Autowired | 70 | @Autowired |
| 69 | private IMSupplierDao imSupplierDao; | 71 | private IMSupplierDao imSupplierDao; |
| 72 | @Resource | ||
| 73 | private MemberReadDao memberReadDao; | ||
| 70 | 74 | ||
| 71 | @RequestMapping( | 75 | @RequestMapping( |
| 72 | value = "/pineapple/call", | 76 | value = "/pineapple/call", |
| ... | @@ -169,14 +173,19 @@ public class PineappleController { | ... | @@ -169,14 +173,19 @@ public class PineappleController { |
| 169 | } | 173 | } |
| 170 | 174 | ||
| 171 | private IMSupplier findAndCheckIMSupplier(BaseRequest request, IMSupplierApp imSupplierApp) { | 175 | private IMSupplier findAndCheckIMSupplier(BaseRequest request, IMSupplierApp imSupplierApp) { |
| 172 | List<IMSupplier> imSuppliers = imSupplierDao.findByIdIn(Arrays.asList(imSupplierApp.getSupplierId())); | 176 | //List<IMSupplier> imSuppliers = imSupplierDao.findByIdIn(Arrays.asList(imSupplierApp.getSupplierId())); |
| 173 | if (CollectionUtils.isEmpty(imSuppliers)) { | 177 | List<Seller> seller = memberReadDao.getSeller(imSupplierApp.getSupplierId()); |
| 178 | if (CollectionUtils.isEmpty(seller)) { | ||
| 174 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据为空,请联系客服", request.getAppkey())); | 179 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据为空,请联系客服", request.getAppkey())); |
| 175 | } | 180 | } |
| 176 | if (imSuppliers.size() > 1) { | 181 | if (seller.size() > 1) { |
| 177 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据有重复,请联系客服", request.getAppkey())); | 182 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据有重复,请联系客服", request.getAppkey())); |
| 178 | } | 183 | } |
| 179 | return imSuppliers.get(0); | 184 | Seller entity = seller.get(0); |
| 185 | IMSupplier iMSupplier = new IMSupplier(); | ||
| 186 | iMSupplier.setId(String.valueOf(entity.getId())); | ||
| 187 | iMSupplier.setName(entity.getName()); | ||
| 188 | return iMSupplier; | ||
| 180 | } | 189 | } |
| 181 | 190 | ||
| 182 | private IMSupplierApp findAndCheckSupplierApp(BaseRequest request) { | 191 | private IMSupplierApp findAndCheckSupplierApp(BaseRequest request) { | ... | ... |
| ... | @@ -7,4 +7,410 @@ | ... | @@ -7,4 +7,410 @@ |
| 7 | <select id="count" resultType="java.lang.Integer"> | 7 | <select id="count" resultType="java.lang.Integer"> |
| 8 | select count(*) from member | 8 | select count(*) from member |
| 9 | </select> | 9 | </select> |
| 10 | |||
| 11 | <!-- 订单实体 --> | ||
| 12 | <resultMap id="orders" type="com.sibu.orderHelper.integral.pineapple.model.Orders"> | ||
| 13 | <result property="id" column="id" /> | ||
| 14 | <result property="sellerId" column="seller_id" /> | ||
| 15 | <result property="sellerName" column="seller_name" /> | ||
| 16 | <result property="orderId" column="order_id" /> | ||
| 17 | <result property="orderSn" column="order_sn" /> | ||
| 18 | <result property="orderProductId" column="order_product_id" /> | ||
| 19 | <result property="productId" column="product_id" /> | ||
| 20 | <result property="productName" column="product_name" /> | ||
| 21 | <result property="memberId" column="member_id" /> | ||
| 22 | <result property="memberName" column="member_name" /> | ||
| 23 | <result property="provinceId" column="province_id" /> | ||
| 24 | <result property="cityId" column="city_id" /> | ||
| 25 | <result property="areaId" column="area_id" /> | ||
| 26 | <result property="addressAll" column="address_all" /> | ||
| 27 | <result property="addressInfo" column="address_info" /> | ||
| 28 | <result property="zipCode" column="zip_code" /> | ||
| 29 | <result property="changeName" column="change_name" /> | ||
| 30 | <result property="phone" column="phone" /> | ||
| 31 | <result property="logisticsId" column="logistics_id" /> | ||
| 32 | <result property="logisticsName" column="logistics_name" /> | ||
| 33 | <result property="logisticsMark" column="logistics_mark" /> | ||
| 34 | <result property="logisticsNumber" column="logistics_number" /> | ||
| 35 | <result property="number" column="number" /> | ||
| 36 | <result property="question" column="question" /> | ||
| 37 | <result property="image" column="image" /> | ||
| 38 | <result property="name" column="name" /> | ||
| 39 | <result property="state" column="state" /> | ||
| 40 | <result property="optId" column="opt_id" /> | ||
| 41 | <result property="optName" column="opt_name" /> | ||
| 42 | <result property="remark" column="remark" /> | ||
| 43 | <result property="createTime" column="create_time" /> | ||
| 44 | <result property="updateTime" column="update_time" /> | ||
| 45 | <result property="province" column="regionName1" /> | ||
| 46 | <result property="city" column="regionName2" /> | ||
| 47 | <result property="area" column="regionName3" /> | ||
| 48 | <result property="orderState" column="order_state" /> | ||
| 49 | </resultMap> | ||
| 50 | |||
| 51 | <!-- 根据订单号查询订单信息 只查询不是主订单的订单 --> | ||
| 52 | <select id="getOrdersByMap" parameterType="java.util.Map" resultMap="orders"> | ||
| 53 | select * from orders where order_sn=#{orderSn,jdbcType=VARCHAR} AND seller_id=#{sellerId,jdbcType=INTEGER} AND is_parent = 0 | ||
| 54 | </select> | ||
| 55 | |||
| 56 | |||
| 57 | <!-- 订单发货--> | ||
| 58 | <!-- 验证订单号是否已存在--> | ||
| 59 | <select id="checkLogisticsNumber" parameterType="java.util.Map" resultType="java.lang.Integer"> | ||
| 60 | select count(*) from orders where order_sn = #{orderSn} AND seller_id = #{sellerId} and logistics_number like concat(concat('%',#{logisticsNumber},'%')) | ||
| 61 | </select> | ||
| 62 | |||
| 63 | |||
| 64 | <!-- 商品下载实体--> | ||
| 65 | <resultMap id="downloadProductBean" type="com.sibu.orderHelper.integral.model.DownloadProductBean"> | ||
| 66 | <result column="id" property="PlatProductID"/> | ||
| 67 | <result column="productName" property="name"/> | ||
| 68 | <result column="outerID" property="OuterID"/> | ||
| 69 | <result column="price" property="price"/> | ||
| 70 | <result column="num" property="num"/> | ||
| 71 | <result column="pictureurl" property="pictureurl"/> | ||
| 72 | </resultMap> | ||
| 73 | |||
| 74 | <!-- 商品下载 --> | ||
| 75 | <select id="downloadProductListByMap" parameterType="java.util.Map" resultMap="downloadProductBean"> | ||
| 76 | SELECT p.id,p.product_code AS outerID,p.name1 AS productName,p.product_stock AS num,p.master_img AS pictureurl, | ||
| 77 | p.mal_mobile_price AS price | ||
| 78 | FROM product p WHERE p.seller_id = #{sellerId} | ||
| 79 | <if test="productId !=null and productId !=''"> | ||
| 80 | AND (p.id = #{productId} or p.product_code = #{productId}) | ||
| 81 | </if> | ||
| 82 | <if test="state !=null and state !='' and state != -1"> | ||
| 83 | AND p.state = #{state} | ||
| 84 | </if> | ||
| 85 | <if test="state !=null and state !='' and state == -1"> | ||
| 86 | AND p.state IN ('6','7') | ||
| 87 | </if> | ||
| 88 | <if test="productName !=null and productName !=''"> | ||
| 89 | AND p.name1 = #{productName} | ||
| 90 | </if> | ||
| 91 | ORDER BY p.update_time DESC | ||
| 92 | limit ${PageIndex}, ${PageSize} | ||
| 93 | </select> | ||
| 94 | |||
| 95 | <!-- 根据条件查询商品 --> | ||
| 96 | <select id="getDownloadProductBeanByMap" parameterType="java.util.Map" resultMap="downloadProductBean"> | ||
| 97 | SELECT p.id,p.product_code AS outerID,p.name1 AS productName,p.product_stock AS num,p.master_img AS pictureurl, | ||
| 98 | p.mal_mobile_price AS price | ||
| 99 | FROM product p WHERE p.seller_id = #{sellerId} | ||
| 100 | <if test="productId !=null and productId !=''"> | ||
| 101 | AND p.id = #{productId} | ||
| 102 | </if> | ||
| 103 | </select> | ||
| 104 | |||
| 105 | <!-- 商品下载总数量 --> | ||
| 106 | <select id="countDownloadProductListByMap" parameterType="java.util.Map" resultType="java.lang.Integer"> | ||
| 107 | SELECT count(*) | ||
| 108 | FROM product p WHERE p.seller_id = #{sellerId} | ||
| 109 | <if test="productId !=null and productId !=''"> | ||
| 110 | AND (p.id = #{productId} or p.product_code = #{productId}) | ||
| 111 | </if> | ||
| 112 | <if test="state !=null and state !='' and state != -1"> | ||
| 113 | AND p.state = #{state} | ||
| 114 | </if> | ||
| 115 | <if test="state !=null and state !='' and state == -1"> | ||
| 116 | AND p.state IN ('6','7') | ||
| 117 | </if> | ||
| 118 | <if test="productName !=null and productName !=''"> | ||
| 119 | AND p.name1 = #{productName} | ||
| 120 | </if> | ||
| 121 | </select> | ||
| 122 | |||
| 123 | <!-- 商品sku实体 --> | ||
| 124 | <resultMap id="downloadSku" type="com.sibu.orderHelper.integral.model.DownloadProductSkuBean"> | ||
| 125 | <result column="skuId" property="SkuID"/> | ||
| 126 | <result column="skuId" property="skuOuterID"/> | ||
| 127 | <result column="skuprice" property="skuprice"/> | ||
| 128 | <result column="skuQuantity" property="skuQuantity"/> | ||
| 129 | <result column="skuname" property="skuname"/> | ||
| 130 | <result column="skupictureurl" property="skupictureurl"/> | ||
| 131 | </resultMap> | ||
| 132 | |||
| 133 | <!-- 获取商品sku --> | ||
| 134 | <select id="downloadSkuByProductId" resultType="java.lang.String" resultMap="downloadSku"> | ||
| 135 | select g.sku AS skuId,g.mall_mobile_price AS skuprice,g.product_stock AS skuQuantity, | ||
| 136 | g.norm_name AS skuname ,g.images AS skupictureurl FROM product_goods g | ||
| 137 | WHERE g.product_id = #{productId} | ||
| 138 | </select> | ||
| 139 | |||
| 140 | |||
| 141 | <!-- 主订单下载--> | ||
| 142 | <select id="getOrdersList" parameterType="java.util.Map" resultMap="orders"> | ||
| 143 | select o.order_sn,o.order_state,o.remark,o.create_time,p.regionName AS regionName1, | ||
| 144 | c.regionName AS regionName2,a.regionName AS regionName3, | ||
| 145 | o.address_info,o.mobile,o.zip_code,o.zip_code,o.money_logistics,o.money_product-o.money_order-o.money_logistics AS couponMoney | ||
| 146 | o.money_order,o.money_product,o.pay_time,o.member_name FROM orders o | ||
| 147 | LEFT JOIN regions p ON p.id = o.province_id | ||
| 148 | LEFT JOIN regions c ON c.id = o.city_id | ||
| 149 | LEFT JOIN regions a ON a.id = o.area_id | ||
| 150 | WHERE o.is_parent = 0 | ||
| 151 | AND seller_id = #{sellerId} AND order_sn = #{orderSn} | ||
| 152 | <if test="startTime !=null and startTime ! =''"> | ||
| 153 | AND create_time >= #{startTime} | ||
| 154 | </if> | ||
| 155 | <if test="endTime !=null and endTime ! =''"> | ||
| 156 | <![CDATA[ | ||
| 157 | and create_time <= #{endTime} | ||
| 158 | ]]> | ||
| 159 | </if> | ||
| 160 | ORDER BY o.id DESC | ||
| 161 | limit ${PageIndex}, ${PageSize} | ||
| 162 | </select> | ||
| 163 | |||
| 164 | <!-- 子订单实体--> | ||
| 165 | <resultMap id="ordersProduct" type="com.sibu.orderHelper.integral.pineapple.model.OrdersProduct"> | ||
| 166 | <result property="id" column="id" /> | ||
| 167 | <result property="ordersId" column="orders_id" /> | ||
| 168 | <result property="ordersSn" column="orders_sn" /> | ||
| 169 | <result property="ordersPsn" column="orders_psn" /> | ||
| 170 | <result property="sellerId" column="seller_id" /> | ||
| 171 | <result property="sellerName" column="seller_name" /> | ||
| 172 | <result property="productCateId" column="product_cate_id" /> | ||
| 173 | <result property="productId" column="product_id" /> | ||
| 174 | <result property="productGoodsId" column="product_goods_id" /> | ||
| 175 | <result property="specInfo" column="spec_info" /> | ||
| 176 | <result property="productName" column="product_name" /> | ||
| 177 | <result property="productSku" column="product_sku" /> | ||
| 178 | <result property="packageGroupsId" column="package_groups_id" /> | ||
| 179 | <result property="mallGroupsId" column="mall_groups_id" /> | ||
| 180 | <result property="giftId" column="gift_id" /> | ||
| 181 | <result property="isGift" column="is_gift" /> | ||
| 182 | <result property="moneyPrice" column="money_price" /> | ||
| 183 | <result property="number" column="number" /> | ||
| 184 | <result property="moneyAmount" column="money_amount" /> | ||
| 185 | <result property="moneyActSingle" column="money_act_single" /> | ||
| 186 | <result property="actSingleId" column="act_single_id" /> | ||
| 187 | <result property="actGroupId" column="act_group_id" /> | ||
| 188 | <result property="actFlashSaleId" column="act_flash_sale_id" /> | ||
| 189 | <result property="actFlashSaleProductId" column="act_flash_sale_product_id" /> | ||
| 190 | <result property="actBiddingId" column="act_bidding_id" /> | ||
| 191 | <result property="actIntegralId" column="act_integral_id" /> | ||
| 192 | <result property="actIntegralNum" column="act_integral_num" /> | ||
| 193 | <result property="actIntegralMoney" column="act_integral_money" /> | ||
| 194 | <result property="systemRemark" column="system_remark" /> | ||
| 195 | <result property="backNumber" column="back_number" /> | ||
| 196 | <result property="exchangeNumber" column="exchange_number" /> | ||
| 197 | <result property="createTime" column="create_time" /> | ||
| 198 | <result property="updateTime" column="update_time" /> | ||
| 199 | <result property="isEvaluate" column="is_evaluate" /> | ||
| 200 | </resultMap> | ||
| 201 | |||
| 202 | |||
| 203 | <!-- 查询子订单--> | ||
| 204 | <select id="getOrdersProductList" resultType="java.util.Map" resultMap="ordersProduct"> | ||
| 205 | SELECT product_sku,id,product_name,spec_info,number,money_price,money_act_single FROM orders_product | ||
| 206 | WHERE orders_sn = #{ordersSn} | ||
| 207 | </select> | ||
| 208 | |||
| 209 | <!-- 地址实体类--> | ||
| 210 | <resultMap id="regionsResult" type="com.sibu.orderHelper.integral.pineapple.model.Regions"> | ||
| 211 | <result property="id" column="id" /> | ||
| 212 | <result property="parentId" column="parentId" /> | ||
| 213 | <result property="regionName" column="regionName" /> | ||
| 214 | <result property="parentPath" column="parentPath" /> | ||
| 215 | <result property="firstLetter" column="firstLetter" /> | ||
| 216 | <result property="regionType" column="regionType" /> | ||
| 217 | <result property="agencyId" column="agencyId" /> | ||
| 218 | <result property="shippingId" column="shippingId" /> | ||
| 219 | <result property="visible" column="visible" /> | ||
| 220 | <result property="rowId" column="rowId" /> | ||
| 221 | </resultMap> | ||
| 222 | |||
| 223 | <!-- 根据条件查询省市级信息--> | ||
| 224 | <select id="getRegionsByMap" parameterType="java.util.Map" resultMap="regionsResult"> | ||
| 225 | SELECT * FROM regions WHERE regionName LIKE concat('%',#{name},'%') AND regionType = #{regionType} | ||
| 226 | </select> | ||
| 227 | |||
| 228 | <!-- 根据id查询省市级信息--> | ||
| 229 | <select id="getRegionsById" parameterType="java.lang.Integer" resultMap="regionsResult"> | ||
| 230 | select | ||
| 231 | * | ||
| 232 | from `regions` | ||
| 233 | where `id` = #{id} | ||
| 234 | </select> | ||
| 235 | |||
| 236 | <!-- 物流公司实体--> | ||
| 237 | <resultMap id="courierCompanyResult" type="com.sibu.orderHelper.integral.pineapple.model.CourierCompany"> | ||
| 238 | <result property="id" column="id" /> | ||
| 239 | <result property="createTime" column="create_time" /> | ||
| 240 | <result property="state" column="state" /> | ||
| 241 | <result property="companyMark" column="company_mark" /> | ||
| 242 | <result property="companyName" column="company_name" /> | ||
| 243 | <result property="seq" column="seq" /> | ||
| 244 | <result property="sellerId" column="seller_id" /> | ||
| 245 | <result property="companyType" column="company_type" /> | ||
| 246 | <result property="imagePath" column="image_path" /> | ||
| 247 | <result property="content" column="content" /> | ||
| 248 | </resultMap> | ||
| 249 | |||
| 250 | <!-- 根据条件查询物流公司--> | ||
| 251 | <select id="getCourierCompanyByName" parameterType="java.util.Map" resultMap="courierCompanyResult"> | ||
| 252 | select | ||
| 253 | * | ||
| 254 | from `courier_company` | ||
| 255 | where company_name LIKE concat('%',#{name},'%') AND seller_id =#{sellerId} | ||
| 256 | </select> | ||
| 257 | |||
| 258 | |||
| 259 | <!--退货表实体--> | ||
| 260 | <resultMap id="memberProductBackResult" type="com.sibu.orderHelper.integral.pineapple.model.MemberProductBack"> | ||
| 261 | <result property="id" column="id" /> | ||
| 262 | <result property="sellerId" column="seller_id" /> | ||
| 263 | <result property="sellerName" column="seller_name" /> | ||
| 264 | <result property="orderId" column="order_id" /> | ||
| 265 | <result property="orderSn" column="order_sn" /> | ||
| 266 | <result property="orderProductId" column="order_product_id" /> | ||
| 267 | <result property="productId" column="product_id" /> | ||
| 268 | <result property="productName" column="product_name" /> | ||
| 269 | <result property="memberId" column="member_id" /> | ||
| 270 | <result property="memberName" column="member_name" /> | ||
| 271 | <result property="provinceId" column="province_id" /> | ||
| 272 | <result property="cityId" column="city_id" /> | ||
| 273 | <result property="areaId" column="area_id" /> | ||
| 274 | <result property="addressAll" column="address_all" /> | ||
| 275 | <result property="addressInfo" column="address_info" /> | ||
| 276 | <result property="zipCode" column="zip_code" /> | ||
| 277 | <result property="contactPhone" column="contact_phone" /> | ||
| 278 | <result property="contactName" column="contact_name" /> | ||
| 279 | <result property="logisticsId" column="logistics_id" /> | ||
| 280 | <result property="logisticsName" column="logistics_name" /> | ||
| 281 | <result property="logisticsMark" column="logistics_mark" /> | ||
| 282 | <result property="logisticsNumber" column="logistics_number" /> | ||
| 283 | <result property="question" column="question" /> | ||
| 284 | <result property="image" column="image" /> | ||
| 285 | <result property="stateReturn" column="state_return" /> | ||
| 286 | <result property="stateMoney" column="state_money" /> | ||
| 287 | <result property="number" column="number" /> | ||
| 288 | <result property="backMoney" column="back_money" /> | ||
| 289 | <result property="backIntegral" column="back_integral" /> | ||
| 290 | <result property="backIntegralMoney" column="back_integral_money" /> | ||
| 291 | <result property="backCouponUserId" column="back_coupon_user_id" /> | ||
| 292 | <result property="backMoneyTime" column="back_money_time" /> | ||
| 293 | <result property="optId" column="opt_id" /> | ||
| 294 | <result property="optName" column="opt_name" /> | ||
| 295 | <result property="remark" column="remark" /> | ||
| 296 | <result property="createTime" column="create_time" /> | ||
| 297 | <result property="updateTime" column="update_time" /> | ||
| 298 | </resultMap> | ||
| 299 | |||
| 300 | <!--根据订单号查询换货信息--> | ||
| 301 | <select id="getMemberProductBackByOrderSn" parameterType="java.lang.String" resultMap="memberProductBackResult"> | ||
| 302 | SELECT * FROM member_product_back WHERE order_sn = #{orderSn} AND state_return IN ('1','2','3','4') ORDER BY create_time | ||
| 303 | </select> | ||
| 304 | |||
| 305 | <!--换货实体类--> | ||
| 306 | <resultMap id="memberProductExchangeResult" type="com.sibu.orderHelper.integral.pineapple.model.MemberProductExchange"> | ||
| 307 | <result property="id" column="id" /> | ||
| 308 | <result property="sellerId" column="seller_id" /> | ||
| 309 | <result property="sellerName" column="seller_name" /> | ||
| 310 | <result property="orderId" column="order_id" /> | ||
| 311 | <result property="orderSn" column="order_sn" /> | ||
| 312 | <result property="orderProductId" column="order_product_id" /> | ||
| 313 | <result property="productId" column="product_id" /> | ||
| 314 | <result property="productName" column="product_name" /> | ||
| 315 | <result property="memberId" column="member_id" /> | ||
| 316 | <result property="memberName" column="member_name" /> | ||
| 317 | <result property="provinceId" column="province_id" /> | ||
| 318 | <result property="cityId" column="city_id" /> | ||
| 319 | <result property="areaId" column="area_id" /> | ||
| 320 | <result property="addressAll" column="address_all" /> | ||
| 321 | <result property="addressInfo" column="address_info" /> | ||
| 322 | <result property="zipCode" column="zip_code" /> | ||
| 323 | <result property="changeName" column="change_name" /> | ||
| 324 | <result property="phone" column="phone" /> | ||
| 325 | <result property="logisticsId" column="logistics_id" /> | ||
| 326 | <result property="logisticsName" column="logistics_name" /> | ||
| 327 | <result property="logisticsMark" column="logistics_mark" /> | ||
| 328 | <result property="logisticsNumber" column="logistics_number" /> | ||
| 329 | <result property="provinceId2" column="province_id2" /> | ||
| 330 | <result property="cityId2" column="city_id2" /> | ||
| 331 | <result property="areaId2" column="area_id2" /> | ||
| 332 | <result property="addressAll2" column="address_all2" /> | ||
| 333 | <result property="addressInfo2" column="address_info2" /> | ||
| 334 | <result property="zipCode2" column="zip_code2" /> | ||
| 335 | <result property="changeName2" column="change_name2" /> | ||
| 336 | <result property="phone2" column="phone2" /> | ||
| 337 | <result property="logisticsId2" column="logistics_id2" /> | ||
| 338 | <result property="logisticsName2" column="logistics_name2" /> | ||
| 339 | <result property="logisticsMark2" column="logistics_mark2" /> | ||
| 340 | <result property="logisticsNumber2" column="logistics_number2" /> | ||
| 341 | <result property="number" column="number" /> | ||
| 342 | <result property="question" column="question" /> | ||
| 343 | <result property="image" column="image" /> | ||
| 344 | <result property="name" column="name" /> | ||
| 345 | <result property="state" column="state" /> | ||
| 346 | <result property="optId" column="opt_id" /> | ||
| 347 | <result property="optName" column="opt_name" /> | ||
| 348 | <result property="remark" column="remark" /> | ||
| 349 | <result property="createTime" column="create_time" /> | ||
| 350 | <result property="updateTime" column="update_time" /> | ||
| 351 | </resultMap> | ||
| 352 | |||
| 353 | <!--根据订单号查询换货信息--> | ||
| 354 | <select id="getMemberProductExchangeByOrderSn" parameterType="java.lang.String" resultMap="memberProductExchangeResult"> | ||
| 355 | SELECT * FROM member_product_exchange WHERE order_sn = #{orderSn} AND state IN ('1','2','3','4') ORDER BY create_time | ||
| 356 | </select> | ||
| 357 | |||
| 358 | <!-- 投诉表实体--> | ||
| 359 | <resultMap id="sellerComplaintResult" type="com.sibu.orderHelper.integral.pineapple.model.SellerComplaint"> | ||
| 360 | <result property="id" column="id" /> | ||
| 361 | <result property="userId" column="user_id" /> | ||
| 362 | <result property="userName" column="user_name" /> | ||
| 363 | <result property="orderId" column="order_id" /> | ||
| 364 | <result property="orderProductId" column="order_product_id" /> | ||
| 365 | <result property="productBackId" column="product_back_id" /> | ||
| 366 | <result property="productExchangeId" column="product_exchange_id" /> | ||
| 367 | <result property="content" column="content" /> | ||
| 368 | <result property="image" column="image" /> | ||
| 369 | <result property="complaintTime" column="complaint_time" /> | ||
| 370 | <result property="sellerId" column="seller_id" /> | ||
| 371 | <result property="sellerComplaintTime" column="seller_complaint_time" /> | ||
| 372 | <result property="sellerCompContent" column="seller_comp_content" /> | ||
| 373 | <result property="sellerCompImage" column="seller_comp_image" /> | ||
| 374 | <result property="state" column="state" /> | ||
| 375 | <result property="optId" column="opt_id" /> | ||
| 376 | <result property="optContent" column="opt_content" /> | ||
| 377 | <result property="userContent" column="user_content" /> | ||
| 378 | <result property="createTime" column="create_time" /> | ||
| 379 | <result property="optTime" column="opt_time" /> | ||
| 380 | </resultMap> | ||
| 381 | |||
| 382 | <!-- 根据条件查询投诉表--> | ||
| 383 | <select id="getSellerComplaintById" parameterType="java.lang.Integer" resultMap="sellerComplaintResult"> | ||
| 384 | SELECT * FROM seller_complaint WHERE order_id = #{orderId} AND state IN (1,3,4) ORDER BY create_time | ||
| 385 | </select> | ||
| 386 | |||
| 387 | |||
| 388 | <select id="findByAppIdAndAppType" resultMap="BaseResultMap"> | ||
| 389 | select * from im_supplier_app where app_id=#{appId} and app_type = #{appType} and app_token = #{appToken} | ||
| 390 | </select> | ||
| 391 | <resultMap id="BaseResultMap" type="com.sibu.orderHelper.integral.model.IMSupplierApp"> | ||
| 392 | <result column="id" property="id"/> | ||
| 393 | <result column="supplier_id" property="supplierId"/> | ||
| 394 | <result column="app_id" property="appId"/> | ||
| 395 | <result column="app_type" property="appType"/> | ||
| 396 | <result column="app_token" property="appToken"/> | ||
| 397 | <result column="app_secret" property="appSecret"/> | ||
| 398 | </resultMap> | ||
| 399 | |||
| 400 | |||
| 401 | <select id="findByIdIn" resultMap="BaseResultMap" parameterType="java.util.Map"> | ||
| 402 | SELECT | ||
| 403 | * | ||
| 404 | FROM im_supplier | ||
| 405 | where id in | ||
| 406 | <foreach collection="supplierIds" item="supplierId" open="(" close=")" separator=","> | ||
| 407 | #{supplierId} | ||
| 408 | </foreach> | ||
| 409 | </select> | ||
| 410 | |||
| 411 | |||
| 412 | <select id="getSeller" parameterType="java.lang.String" resultType="com.sibu.orderHelper.integral.pineapple.model.Seller"> | ||
| 413 | select * from seller | ||
| 414 | where `id` = #{id} | ||
| 415 | </select> | ||
| 10 | </mapper> | 416 | </mapper> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -7,4 +7,68 @@ | ... | @@ -7,4 +7,68 @@ |
| 7 | <select id="count" resultType="java.lang.Integer"> | 7 | <select id="count" resultType="java.lang.Integer"> |
| 8 | select count(*) from member | 8 | select count(*) from member |
| 9 | </select> | 9 | </select> |
| 10 | |||
| 11 | <!-- 修改订单备注 --> | ||
| 12 | <update id="updateOdersRemark" parameterType="java.util.Map"> | ||
| 13 | UPDATE orders SET remark = #{remark},update_time = now() WHERE order_sn = #{orderSn} AND seller_id = #{sellerId} | ||
| 14 | </update> | ||
| 15 | |||
| 16 | |||
| 17 | <!--更改订单状态、电话、地址、发货时间、收货人姓名,快递单号 --> | ||
| 18 | <update id="updateOrdersState"> | ||
| 19 | UPDATE orders | ||
| 20 | <set> | ||
| 21 | <if test="name !=null and name !=''"> | ||
| 22 | name = #{name}, | ||
| 23 | </if> | ||
| 24 | <if test="addressInfo !=null and addressInfo !=''"> | ||
| 25 | address_info = #{addressInfo}, | ||
| 26 | </if> | ||
| 27 | <if test="logisticsNumber !=null and logisticsNumber !=''"> | ||
| 28 | logistics_number = #{logisticsNumber}, | ||
| 29 | </if> | ||
| 30 | <if test="mobile !=null and mobile !=''"> | ||
| 31 | mobile = #{mobile}, | ||
| 32 | </if> | ||
| 33 | <if test="addressAll !=null and addressAll !=''"> | ||
| 34 | address_all = #{addressAll}, | ||
| 35 | </if> | ||
| 36 | <if test="orderState !=null and orderState !=''"> | ||
| 37 | order_state = #{orderState}, | ||
| 38 | </if> | ||
| 39 | <if test="provinceId !=null and provinceId !=''"> | ||
| 40 | province_id = #{provinceId}, | ||
| 41 | </if> | ||
| 42 | <if test="areaId !=null and areaId !=''"> | ||
| 43 | area_id = #{areaId}, | ||
| 44 | </if> | ||
| 45 | <if test="cityId !=null and cityId !=''"> | ||
| 46 | city_id = #{cityId}, | ||
| 47 | </if> | ||
| 48 | <if test="deliverTime !=null and deliverTime !=''"> | ||
| 49 | deliver_time = now(), | ||
| 50 | </if> | ||
| 51 | <if test="logisticsName !=null and logisticsName !=''"> | ||
| 52 | logistics_name = #{logisticsName}, | ||
| 53 | </if> | ||
| 54 | <if test="logisticsId !=null and logisticsId !=''"> | ||
| 55 | logistics_id = #{logisticsId}, | ||
| 56 | </if> | ||
| 57 | update_time = now() | ||
| 58 | </set> | ||
| 59 | WHERE order_sn = #{orderSn} AND seller_id = #{sellerId} | ||
| 60 | </update> | ||
| 61 | |||
| 62 | |||
| 63 | |||
| 64 | <!-- 更新SKU库存--> | ||
| 65 | <update id="updateSkuStock" parameterType="java.util.Map"> | ||
| 66 | UPDATE product_goods SET product_stock = #{stock} WHERE sku = #{skuId} and product_id = #{productId} | ||
| 67 | </update> | ||
| 68 | |||
| 69 | <!-- 更新产品库存--> | ||
| 70 | <update id="updateProductStock" parameterType="java.util.Map"> | ||
| 71 | UPDATE product SET product_stock = #{productStock} WHERE id = #{productId} | ||
| 72 | </update> | ||
| 73 | |||
| 10 | </mapper> | 74 | </mapper> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -3,13 +3,14 @@ package com.sibu.orderHelper.integral.pineapple.model; | ... | @@ -3,13 +3,14 @@ package com.sibu.orderHelper.integral.pineapple.model; |
| 3 | import lombok.Data; | 3 | import lombok.Data; |
| 4 | import lombok.ToString; | 4 | import lombok.ToString; |
| 5 | 5 | ||
| 6 | import java.io.Serializable; | ||
| 6 | import java.math.BigDecimal; | 7 | import java.math.BigDecimal; |
| 7 | import java.util.Date; | 8 | import java.util.Date; |
| 8 | import java.util.List; | 9 | import java.util.List; |
| 9 | 10 | ||
| 10 | @Data | 11 | @Data |
| 11 | @ToString | 12 | @ToString |
| 12 | public class Orders { | 13 | public class Orders implements Serializable{ |
| 13 | private Integer id; | 14 | private Integer id; |
| 14 | private String orderSn; | 15 | private String orderSn; |
| 15 | private String orderPsn; | 16 | private String orderPsn; |
| ... | @@ -68,7 +69,7 @@ public class Orders { | ... | @@ -68,7 +69,7 @@ public class Orders { |
| 68 | private String codconfirmRemark; | 69 | private String codconfirmRemark; |
| 69 | private Integer codconfirmState; | 70 | private Integer codconfirmState; |
| 70 | private String createTime; | 71 | private String createTime; |
| 71 | private String DateupdateTime; | 72 | private String updateTime; |
| 72 | private Integer evaluateState; | 73 | private Integer evaluateState; |
| 73 | private String regionName1; | 74 | private String regionName1; |
| 74 | private String regionName2; | 75 | private String regionName2; | ... | ... |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Seller.java
0 → 100644
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | import java.math.BigDecimal; | ||
| 8 | import java.util.Date; | ||
| 9 | |||
| 10 | @Data | ||
| 11 | @ToString | ||
| 12 | public class Seller implements Serializable{ | ||
| 13 | |||
| 14 | |||
| 15 | private Integer id; //id | ||
| 16 | private Integer memberId; //用户ID | ||
| 17 | private String name; //用户名 | ||
| 18 | private String sellerName; //店铺名称 | ||
| 19 | private String sellerLogo; //店铺logo | ||
| 20 | private Integer sellerGrade; //店铺等级 | ||
| 21 | private String scoreService; //店铺评分服务 | ||
| 22 | private String scoreDeliverGoods; //店铺评分发货 | ||
| 23 | private String scoreDescription; //店铺评分描述 | ||
| 24 | private Integer productNumber; //商品数量 | ||
| 25 | private Integer collectionNumber; //店铺收藏 | ||
| 26 | private Date createTime; //创建时间 | ||
| 27 | private BigDecimal saleMoney; //店铺总销售金额 | ||
| 28 | private Integer orderCount; //店铺总订单量 | ||
| 29 | private Integer orderCountOver; //店铺完成订单量 | ||
| 30 | private String sellerKeyword; //SEO关键字 | ||
| 31 | private String sellerDes; //SEO店铺描述 | ||
| 32 | private Integer auditStatus; //审核状态 1、待审核;2、审核通过;3、冻结 | ||
| 33 | private String storeSlide; | ||
| 34 | } |
| ... | @@ -6,9 +6,11 @@ import com.sibu.orderHelper.integral.dao.IMSupplierAppDao; | ... | @@ -6,9 +6,11 @@ import com.sibu.orderHelper.integral.dao.IMSupplierAppDao; |
| 6 | import com.sibu.orderHelper.integral.model.IMSupplierApp; | 6 | import com.sibu.orderHelper.integral.model.IMSupplierApp; |
| 7 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; | 7 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; |
| 8 | import com.sibu.orderHelper.integral.service.IMSupplierAppService; | 8 | import com.sibu.orderHelper.integral.service.IMSupplierAppService; |
| 9 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
| 11 | 12 | ||
| 13 | import javax.annotation.Resource; | ||
| 12 | import java.util.HashMap; | 14 | import java.util.HashMap; |
| 13 | import java.util.Map; | 15 | import java.util.Map; |
| 14 | 16 | ||
| ... | @@ -23,6 +25,9 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { | ... | @@ -23,6 +25,9 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { |
| 23 | @Autowired | 25 | @Autowired |
| 24 | private IMSupplierAppDao imSupplierAppDao; | 26 | private IMSupplierAppDao imSupplierAppDao; |
| 25 | 27 | ||
| 28 | @Resource | ||
| 29 | private MemberReadDao memberReadDao; | ||
| 30 | |||
| 26 | @Override | 31 | @Override |
| 27 | public IMSupplierApp findByAppIdAndAppType(String appId, SupplierAppTypeEnum appType) { | 32 | public IMSupplierApp findByAppIdAndAppType(String appId, SupplierAppTypeEnum appType) { |
| 28 | Map<String, String> params = new HashMap<>(); | 33 | Map<String, String> params = new HashMap<>(); |
| ... | @@ -37,6 +42,6 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { | ... | @@ -37,6 +42,6 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { |
| 37 | params.put("appId", requestParams.getAppkey()); | 42 | params.put("appId", requestParams.getAppkey()); |
| 38 | params.put("appToken", requestParams.getToken()); | 43 | params.put("appToken", requestParams.getToken()); |
| 39 | params.put("appType", appType.getCode()); | 44 | params.put("appType", appType.getCode()); |
| 40 | return imSupplierAppDao.findByAppIdAndAppType(params); | 45 | return memberReadDao.findByAppIdAndAppType(params); |
| 41 | } | 46 | } |
| 42 | } | 47 | } | ... | ... |
| ... | @@ -10,6 +10,7 @@ import com.sibu.orderHelper.integral.model.DownloadProductSkuBean; | ... | @@ -10,6 +10,7 @@ import com.sibu.orderHelper.integral.model.DownloadProductSkuBean; |
| 10 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 10 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 11 | import com.sibu.orderHelper.integral.reponse.DownloadProductResponse; | 11 | import com.sibu.orderHelper.integral.reponse.DownloadProductResponse; |
| 12 | import com.sibu.orderHelper.integral.request.DownloadProductRequest; | 12 | import com.sibu.orderHelper.integral.request.DownloadProductRequest; |
| 13 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 13 | import org.apache.log4j.Logger; | 14 | import org.apache.log4j.Logger; |
| 14 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
| 15 | 16 | ||
| ... | @@ -23,13 +24,13 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP | ... | @@ -23,13 +24,13 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP |
| 23 | 24 | ||
| 24 | private static Logger log = Logger.getLogger(DownloadProductBizServiceImpl.class); | 25 | private static Logger log = Logger.getLogger(DownloadProductBizServiceImpl.class); |
| 25 | @Resource | 26 | @Resource |
| 26 | private PineappleDao pineappleDao; | 27 | private MemberReadDao memberReadDao; |
| 27 | 28 | ||
| 28 | @Override | 29 | @Override |
| 29 | public DownloadProductResponse call(CallRequest<DownloadProductRequest> callRequest) throws Exception { | 30 | public DownloadProductResponse call(CallRequest<DownloadProductRequest> callRequest) throws Exception { |
| 30 | DownloadProductResponse downloadProductResponse = new DownloadProductResponse(); | 31 | DownloadProductResponse downloadProductResponse = new DownloadProductResponse(); |
| 31 | Map<String,Object> params =new HashMap<>(); | 32 | Map<String,Object> params =new HashMap<>(); |
| 32 | params.put("supplierId",callRequest.getSupplier().getId()); | 33 | params.put("sellerId",callRequest.getSupplier().getId()); |
| 33 | if(!StringUtil.isNull(callRequest.getBizModel().getStatus())){ | 34 | if(!StringUtil.isNull(callRequest.getBizModel().getStatus())){ |
| 34 | params.put("state", DownloadProductStatusEnum.resolve(callRequest.getBizModel().getStatus()).intValue()); | 35 | params.put("state", DownloadProductStatusEnum.resolve(callRequest.getBizModel().getStatus()).intValue()); |
| 35 | } | 36 | } |
| ... | @@ -42,14 +43,15 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP | ... | @@ -42,14 +43,15 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP |
| 42 | params.put("productName",callRequest.getBizModel().getPageSize()); | 43 | params.put("productName",callRequest.getBizModel().getPageSize()); |
| 43 | } | 44 | } |
| 44 | //查询产品 | 45 | //查询产品 |
| 45 | List<DownloadProductBean> downloadProductBeanList = pineappleDao.downloadProductListByMap(params); | 46 | List<DownloadProductBean> downloadProductBeanList = memberReadDao.downloadProductListByMap(params); |
| 46 | if(!StringUtil.isNull(downloadProductBeanList) && !downloadProductBeanList.isEmpty()){ | 47 | if(!StringUtil.isNull(downloadProductBeanList) && !downloadProductBeanList.isEmpty()){ |
| 47 | for(DownloadProductBean product : downloadProductBeanList){ | 48 | for(DownloadProductBean product : downloadProductBeanList){ |
| 48 | //产品SKU | 49 | //产品SKU |
| 49 | List<DownloadProductSkuBean> downloadProductSkuBeanList = pineappleDao.downloadSkuByProductId(product.getPlatProductID()); | 50 | List<DownloadProductSkuBean> downloadProductSkuBeanList = memberReadDao.downloadSkuByProductId(product.getPlatProductID()); |
| 50 | product.setSkus(downloadProductSkuBeanList); | 51 | product.setSkus(downloadProductSkuBeanList); |
| 51 | }; | 52 | }; |
| 52 | downloadProductResponse.setTotalcount(downloadProductBeanList.size()); | 53 | int count = memberReadDao.countDownloadProductListByMap(params); |
| 54 | downloadProductResponse.setTotalcount(count); | ||
| 53 | }else{ | 55 | }else{ |
| 54 | downloadProductResponse.setTotalcount(0); | 56 | downloadProductResponse.setTotalcount(0); |
| 55 | } | 57 | } | ... | ... |
| ... | @@ -17,6 +17,8 @@ import com.sibu.orderHelper.integral.pineapple.model.Regions; | ... | @@ -17,6 +17,8 @@ import com.sibu.orderHelper.integral.pineapple.model.Regions; |
| 17 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 17 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 18 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; | 18 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; |
| 19 | import com.sibu.orderHelper.integral.request.PineappleSendRequest; | 19 | import com.sibu.orderHelper.integral.request.PineappleSendRequest; |
| 20 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 21 | import com.sibu.orderHelper.mall.member.write.MemberWriteDao; | ||
| 20 | import org.apache.log4j.Logger; | 22 | import org.apache.log4j.Logger; |
| 21 | import org.springframework.stereotype.Service; | 23 | import org.springframework.stereotype.Service; |
| 22 | 24 | ||
| ... | @@ -28,7 +30,9 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -28,7 +30,9 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
| 28 | 30 | ||
| 29 | private static Logger log = Logger.getLogger(PineappleSendBizServiceImpl.class); | 31 | private static Logger log = Logger.getLogger(PineappleSendBizServiceImpl.class); |
| 30 | @Resource | 32 | @Resource |
| 31 | private PineappleDao pineappleDao; | 33 | private MemberReadDao memberReadDao; |
| 34 | @Resource | ||
| 35 | private MemberWriteDao memberWriteDao; | ||
| 32 | 36 | ||
| 33 | @Override | 37 | @Override |
| 34 | public BaseResponse call(CallRequest<PineappleSendRequest> callRequest) throws Exception { | 38 | public BaseResponse call(CallRequest<PineappleSendRequest> callRequest) throws Exception { |
| ... | @@ -37,7 +41,7 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -37,7 +41,7 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
| 37 | params.put("orderSn",callRequest.getBizModel().getPlatOrderNo()); | 41 | params.put("orderSn",callRequest.getBizModel().getPlatOrderNo()); |
| 38 | params.put("sellerId",callRequest.getSupplier().getId()); | 42 | params.put("sellerId",callRequest.getSupplier().getId()); |
| 39 | 43 | ||
| 40 | Orders orders = pineappleDao.getOrdersByMap(params); | 44 | Orders orders = memberReadDao.getOrdersByMap(params); |
| 41 | if(StringUtil.isNull(orders)){ | 45 | if(StringUtil.isNull(orders)){ |
| 42 | log.error(String.format("订单发货,获取订单数据业务异常:[%s]",callRequest.getBizModel().getPlatOrderNo())); | 46 | log.error(String.format("订单发货,获取订单数据业务异常:[%s]",callRequest.getBizModel().getPlatOrderNo())); |
| 43 | throw new BizException(String.format("订单发货,获取订单数据业务异常:[%s]",callRequest.getBizModel().getPlatOrderNo())); | 47 | throw new BizException(String.format("订单发货,获取订单数据业务异常:[%s]",callRequest.getBizModel().getPlatOrderNo())); |
| ... | @@ -65,7 +69,7 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -65,7 +69,7 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
| 65 | 69 | ||
| 66 | if(!StringUtil.isNull(callRequest.getBizModel().getLogisticNo())){ | 70 | if(!StringUtil.isNull(callRequest.getBizModel().getLogisticNo())){ |
| 67 | //判断该快递订单号是否存在,已存在就不允许把该快递订单号添加进去 | 71 | //判断该快递订单号是否存在,已存在就不允许把该快递订单号添加进去 |
| 68 | int num = pineappleDao.checkLogisticsNumber(params); | 72 | int num = memberReadDao.checkLogisticsNumber(params); |
| 69 | if(num == 0){ | 73 | if(num == 0){ |
| 70 | if(StringUtil.isNull(orders.getLogisticsNumber())){ | 74 | if(StringUtil.isNull(orders.getLogisticsNumber())){ |
| 71 | params.put("logisticsNumber",callRequest.getBizModel().getLogisticNo()); | 75 | params.put("logisticsNumber",callRequest.getBizModel().getLogisticNo()); |
| ... | @@ -80,7 +84,7 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -80,7 +84,7 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
| 80 | throw new BizException(String.format("订单发货接口,该订单状态不允许进行发货操作,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | 84 | throw new BizException(String.format("订单发货接口,该订单状态不允许进行发货操作,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); |
| 81 | } | 85 | } |
| 82 | //修改订单信息 | 86 | //修改订单信息 |
| 83 | pineappleDao.updateOrdersState(params); | 87 | memberWriteDao.updateOrdersState(params); |
| 84 | baseResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 88 | baseResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); |
| 85 | baseResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 89 | baseResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
| 86 | return baseResponse; | 90 | return baseResponse; |
| ... | @@ -102,17 +106,17 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -102,17 +106,17 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
| 102 | Map<String,Object> map = new HashMap<>(); | 106 | Map<String,Object> map = new HashMap<>(); |
| 103 | map.put("regionType",3); | 107 | map.put("regionType",3); |
| 104 | map.put("name",str[2]); | 108 | map.put("name",str[2]); |
| 105 | Regions regions = pineappleDao.getRegionsByMap(map); | 109 | List<Regions> regions = memberReadDao.getRegionsByMap(map); |
| 106 | if(StringUtil.isNull(regions)){ | 110 | if(StringUtil.isNull(regions) || regions.size() > 1){ |
| 107 | params.put("provinceId","99999990"); | 111 | params.put("provinceId","99999990"); |
| 108 | params.put("cityId", "99999989"); | 112 | params.put("cityId", "99999989"); |
| 109 | params.put("areaId","99999988"); | 113 | params.put("areaId","99999988"); |
| 110 | }else{ | 114 | }else{ |
| 111 | params.put("area",regions.getId()); | 115 | params.put("area",regions.get(0).getId()); |
| 112 | Regions city = pineappleDao.getRegionsById(regions.getId()); | 116 | Regions city = memberReadDao.getRegionsById(regions.get(0).getId()); |
| 113 | Regions province = null; | 117 | Regions province = null; |
| 114 | if(!StringUtil.isNull(city)){ | 118 | if(!StringUtil.isNull(city)){ |
| 115 | province = pineappleDao.getRegionsById(city.getId()); | 119 | province = memberReadDao.getRegionsById(city.getId()); |
| 116 | } | 120 | } |
| 117 | if(!StringUtil.isNull(city) && !StringUtil.isNull(province)){ | 121 | if(!StringUtil.isNull(city) && !StringUtil.isNull(province)){ |
| 118 | params.put("provinceId", province.getId()); | 122 | params.put("provinceId", province.getId()); |
| ... | @@ -133,8 +137,8 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen | ... | @@ -133,8 +137,8 @@ public class PineappleSendBizServiceImpl extends AbstractBizService<PineappleSen |
| 133 | Map<String,Object> m = new HashMap<>(); | 137 | Map<String,Object> m = new HashMap<>(); |
| 134 | m.put("name","orders.getLogisticsName()"); | 138 | m.put("name","orders.getLogisticsName()"); |
| 135 | m.put("sellerId",callRequest.getSupplier().getId()); | 139 | m.put("sellerId",callRequest.getSupplier().getId()); |
| 136 | List<CourierCompany> courierCompanyByName = pineappleDao.getCourierCompanyByName(m); | 140 | List<CourierCompany> courierCompanyByName = memberReadDao.getCourierCompanyByName(m); |
| 137 | if(!StringUtil.isNull(courierCompanyByName) && !courierCompanyByName.isEmpty()){ | 141 | if(!StringUtil.isNull(courierCompanyByName) && !courierCompanyByName.isEmpty() && courierCompanyByName.size() == 1){ |
| 138 | Optional<CourierCompany> first = courierCompanyByName.stream().findFirst(); | 142 | Optional<CourierCompany> first = courierCompanyByName.stream().findFirst(); |
| 139 | params.put("logisticsName",callRequest.getBizModel().getLogisticName()); | 143 | params.put("logisticsName",callRequest.getBizModel().getLogisticName()); |
| 140 | params.put("logisticsId", first.get().getId()); | 144 | params.put("logisticsId", first.get().getId()); | ... | ... |
| ... | @@ -13,8 +13,11 @@ import com.sibu.orderHelper.integral.pineapple.model.Orders; | ... | @@ -13,8 +13,11 @@ import com.sibu.orderHelper.integral.pineapple.model.Orders; |
| 13 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 13 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 14 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; | 14 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; |
| 15 | import com.sibu.orderHelper.integral.request.UpdateSellerMemoRequest; | 15 | import com.sibu.orderHelper.integral.request.UpdateSellerMemoRequest; |
| 16 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 17 | import com.sibu.orderHelper.mall.member.write.MemberWriteDao; | ||
| 16 | import org.apache.log4j.Logger; | 18 | import org.apache.log4j.Logger; |
| 17 | import org.springframework.stereotype.Service; | 19 | import org.springframework.stereotype.Service; |
| 20 | import org.springframework.transaction.annotation.Transactional; | ||
| 18 | 21 | ||
| 19 | import javax.annotation.Resource; | 22 | import javax.annotation.Resource; |
| 20 | import java.util.HashMap; | 23 | import java.util.HashMap; |
| ... | @@ -24,22 +27,25 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS | ... | @@ -24,22 +27,25 @@ public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateS |
| 24 | 27 | ||
| 25 | private static Logger log = Logger.getLogger(UpdateSellerMemoBizServiceImpl.class); | 28 | private static Logger log = Logger.getLogger(UpdateSellerMemoBizServiceImpl.class); |
| 26 | 29 | ||
| 30 | |||
| 31 | @Resource | ||
| 32 | private MemberReadDao memberReadDao; | ||
| 27 | @Resource | 33 | @Resource |
| 28 | private PineappleDao pineappleDao; | 34 | private MemberWriteDao memberWriteDao; |
| 29 | 35 | ||
| 30 | @Override | 36 | @Override |
| 31 | public UpdateSellerMemoResponse call(CallRequest<UpdateSellerMemoRequest> callRequest) throws Exception { | 37 | public UpdateSellerMemoResponse call(CallRequest<UpdateSellerMemoRequest> callRequest) throws Exception { |
| 32 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); | 38 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); |
| 33 | Map<String,Object> params = new HashMap<>(); | 39 | Map<String,Object> params = new HashMap<>(); |
| 34 | params.put("orderSn ",callRequest.getBizModel().getPlatOrderNo()); | 40 | params.put("orderSn",callRequest.getBizModel().getPlatOrderNo()); |
| 35 | params.put("remark ",callRequest.getBizModel().getSellerMemo()); | 41 | params.put("remark",callRequest.getBizModel().getSellerMemo()); |
| 36 | params.put("sellerId",callRequest.getSupplier().getId()); | 42 | params.put("sellerId",callRequest.getSupplier().getId()); |
| 37 | Orders orders = pineappleDao.getOrdersByMap(params); | 43 | Orders orders = memberReadDao.getOrdersByMap(params); |
| 38 | if(StringUtil.isNull(orders)){ | 44 | if(StringUtil.isNull(orders)){ |
| 39 | log.error(String.format("修改订单备注,获取订单数据业务异常,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | 45 | log.error(String.format("修改订单备注,获取订单数据业务异常,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); |
| 40 | throw new BizException(String.format("修改订单备注,获取订单数据业务异常,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | 46 | throw new BizException(String.format("修改订单备注,获取订单数据业务异常,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); |
| 41 | } | 47 | } |
| 42 | if(pineappleDao.updateOdersRemark(params) != 1){ | 48 | if(memberWriteDao.updateOdersRemark(params) != 1){ |
| 43 | log.error(String.format("修改订单备注,修改失败,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | 49 | log.error(String.format("修改订单备注,修改失败,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); |
| 44 | throw new BizException(String.format("修改订单备注,修改失败,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | 50 | throw new BizException(String.format("修改订单备注,修改失败,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); |
| 45 | } | 51 | } | ... | ... |
-
请 注册 或 登录 后发表评论