'修改订单'

dev-discount
= 4 years ago
parent daaeb8eecd
commit c25cc69098
  1. 37
      hai-bweb/src/main/java/com/bweb/controller/HighOrderController.java
  2. 11
      hai-bweb/src/main/java/com/bweb/model/ExportHighOrderModel.java
  3. 1
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  4. 25
      hai-cweb/src/main/java/com/cweb/controller/HighMerchantStoreController.java
  5. 13
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  6. 14
      hai-service/src/main/java/com/hai/entity/HighMerchantStore.java
  7. 12
      hai-service/src/main/java/com/hai/model/HighMerchantStoreModel.java
  8. 9
      hai-service/src/main/java/com/hai/model/HighOrderModel.java
  9. 7
      hai-service/src/main/java/com/hai/service/HighMerchantService.java
  10. 5
      hai-service/src/main/java/com/hai/service/impl/HighMerchantServiceImpl.java

@ -147,6 +147,7 @@ public class HighOrderController {
@ResponseBody
@ApiOperation(value = "查询商品订单列表")
public ResponseData getGoodsOrderList(@RequestParam(name = "companyId", required = false) Long companyId,
@RequestParam(name = "merchantId", required = false) Long merchantId,
@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "paySerialNo", required = false) String paySerialNo,
@RequestParam(name = "payModel", required = false) Integer payModel,
@ -155,10 +156,26 @@ public class HighOrderController {
@RequestParam(name = "payTimeS", required = false) Long payTimeS,
@RequestParam(name = "payTimeE", required = false) Long payTimeE,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
@RequestParam(name = "pageSize", required = true) Integer pageSize,
HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
Map<String,Object> map = new HashMap<>();
// 用户来源 0:超级管理员 1:公司 2:商户 3:门店 4. 代理商
if(userInfoModel.getSecUser().getObjectType() == 0) {
map.put("companyId", companyId);
} else if (userInfoModel.getSecUser().getObjectType() == 1) {
map.put("companyId", userInfoModel.getBsCompany().getId());
map.put("merchantId", merchantId);
} else if (userInfoModel.getSecUser().getObjectType() == 2) {
map.put("merchantId", userInfoModel.getMerchant().getId());
}
map.put("orderNo", orderNo);
map.put("paySerialNo", paySerialNo);
map.put("payModel", payModel);
@ -180,6 +197,7 @@ public class HighOrderController {
@ResponseBody
@ApiOperation(value = "导出商品订单列表")
public ResponseData exportGoodsOrderList(@RequestParam(name = "companyId", required = false) Long companyId,
@RequestParam(name = "merchantId", required = false) Long merchantId,
@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "paySerialNo", required = false) String paySerialNo,
@RequestParam(name = "payModel", required = false) Integer payModel,
@ -187,11 +205,24 @@ public class HighOrderController {
@RequestParam(name = "orderStatus", required = false) Integer orderStatus,
@RequestParam(name = "payTimeS", required = false) Long payTimeS,
@RequestParam(name = "payTimeE", required = false) Long payTimeE,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
Map<String,Object> map = new HashMap<>();
// 用户来源 0:超级管理员 1:公司 2:商户 3:门店 4. 代理商
if(userInfoModel.getSecUser().getObjectType() == 0) {
map.put("companyId", companyId);
map.put("merchantId", merchantId);
} else if (userInfoModel.getSecUser().getObjectType() == 1) {
map.put("companyId", userInfoModel.getBsCompany().getId());
map.put("merchantId", merchantId);
} else if (userInfoModel.getSecUser().getObjectType() == 2) {
map.put("merchantId", userInfoModel.getMerchant().getId());
}
map.put("orderNo", orderNo);
map.put("paySerialNo", paySerialNo);
map.put("payModel", payModel);

@ -7,6 +7,9 @@ import java.util.Date;
public class ExportHighOrderModel {
@ExcelProperty("商户名称")
private String merchantName;
@ExcelProperty("商品类型")
private String goodsType;
@ -64,6 +67,14 @@ public class ExportHighOrderModel {
@ExcelProperty("取消时间")
private Date cancelTime;
public String getMerchantName() {
return merchantName;
}
public void setMerchantName(String merchantName) {
this.merchantName = merchantName;
}
public String getGoodsType() {
return goodsType;
}

@ -99,6 +99,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/discount/getDiscountByDiscountAgentId")
.excludePathPatterns("/highMerchantStore/getMerchantStoreById")
.excludePathPatterns("/highMerchantStore/getStoreListByCoupon")
.excludePathPatterns("/highMerchantStore/getStoreList")
.excludePathPatterns("/highMerchantStore/getMerchantList")
.excludePathPatterns("/highMerchantStore/getStoreListByMerchant")
.excludePathPatterns("/wechat/*")

@ -1,5 +1,6 @@
package com.cweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
@ -153,5 +154,29 @@ public class HighMerchantStoreController {
}
}
@RequestMapping(value="/getStoreList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询门店列表")
public ResponseData getStoreList(@RequestParam(name = "storeName", required = false) String storeName,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
Map<String,Object> map = new HashMap<>();
map.put("storeName", storeName);
PageHelper.startPage(pageNum,pageSize);
PageInfo<HighMerchantStore> pageInfo = new PageInfo<>(highMerchantStoreService.getMerchantStoreList(map));
for (HighMerchantStore store : pageInfo.getList()) {
store.setHighMerchant(highMerchantService.getDetailById(store.getMerchantId()));
}
return ResponseMsgUtil.success(pageInfo);
} catch (Exception e) {
log.error("HighMerchantStoreController -> getStoreList() error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -94,6 +94,7 @@ public interface HighOrderMapperExt {
@Select({"<script>" +
" SELECT" +
" (select mer.merchant_name from high_merchant mer where EXISTS (select 1 from high_coupon cou where cou.id = a.goods_id and mer.id = cou.merchant_id)) merchantName," +
" case a.goods_type when 1 then '卡券' when 2 then '金币充值' end goodsType, " +
" a.goods_name goodsName, " +
" case a.giveaway_type when 1 then '赠送' when 0 then '购买' end giveawayType," +
@ -103,12 +104,12 @@ public interface HighOrderMapperExt {
" case b.pay_model when 1 then '金币' when 2 then '第三方' end payModel, " +
" case b.pay_type when 1 then '支付宝' when 2 then '微信' when 3 then '金币' end payType," +
" b.pay_serial_no paySerialNo," +
" b.total_price totalPrice," +
" case a.giveaway_type when 0 then b.total_price when 1 then 0 end totalPrice," +
" b.mem_discount_name memDiscountName," +
" b.deduction_price deductionPrice," +
" case when b.pay_gold is null then 0 else pay_gold end payGold," +
" b.pay_price payPrice," +
" b.pay_real_price payRealPrice, " +
" case a.giveaway_type when 0 then case when b.pay_gold is null then 0 else pay_gold end when 1 then 0 end payGold," +
" case a.giveaway_type when 0 then b.pay_price when 1 then 0 end payPrice," +
" case a.giveaway_type when 0 then case when b.pay_gold is not null then convert(b.pay_gold / 100,decimal(10,2)) else b.pay_real_price end when 1 then 0 end payRealPrice," +
" case b.order_status when 1 then '待支付' when 2 then '已支付' when 3 then '已完成' when 4 then '已退款' when 5 then '已取消' end orderStatus, " +
" b.create_time createTime," +
" b.pay_time payTime," +
@ -120,7 +121,9 @@ public interface HighOrderMapperExt {
" a.order_id = b.id" +
" and a.goods_type = 1" +
" and a.giveaway_type = 0" +
"<if test='map.companyId != null'> and EXISTS (select 1 from high_coupon c where c.company_id = #{map.companyId} and c.id = a.goods_id)</if>",
" and EXISTS (select 1 from high_coupon c where c.id = a.goods_id " +
" <if test='map.companyId != null'> and c.company_id = #{map.companyId} </if> " +
" <if test='map.merchantId != null'> and c.merchant_id = #{map.merchantId} </if> )" +
" <if test='map.orderNo != null'> and b.order_no = #{map.orderNo}</if>",
" <if test='map.paySerialNo != null'> and b.pay_serial_no = #{map.paySerialNo} </if>",
" <if test='map.payModel != null'> and b.pay_model = #{map.payModel} </if>",

@ -106,6 +106,20 @@ public class HighMerchantStore implements Serializable {
private Double distance;
private HighMerchant highMerchant;
public HighMerchant getHighMerchant() {
return highMerchant;
}
public void setHighMerchant(HighMerchant highMerchant) {
this.highMerchant = highMerchant;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
private static final long serialVersionUID = 1L;
public Double getDistance() {

@ -1,5 +1,6 @@
package com.hai.model;
import com.hai.entity.HighMerchant;
import com.hai.entity.HighMerchantStore;
import com.hai.entity.SecUser;
@ -13,6 +14,9 @@ public class HighMerchantStoreModel extends HighMerchantStore {
// 账号
private SecUser secUser;
// 商户
private HighMerchant highMerchant;
public SecUser getSecUser() {
return secUser;
}
@ -20,4 +24,12 @@ public class HighMerchantStoreModel extends HighMerchantStore {
public void setSecUser(SecUser secUser) {
this.secUser = secUser;
}
public HighMerchant getHighMerchant() {
return highMerchant;
}
public void setHighMerchant(HighMerchant highMerchant) {
this.highMerchant = highMerchant;
}
}

@ -5,6 +5,7 @@ import java.util.Date;
public class HighOrderModel {
private String merchantName;
private String goodsType;
private String goodsName;
private String giveawayType;
@ -25,6 +26,14 @@ public class HighOrderModel {
private Date payTime;
private Date cancelTime;
public String getMerchantName() {
return merchantName;
}
public void setMerchantName(String merchantName) {
this.merchantName = merchantName;
}
public String getGoodsType() {
return goodsType;
}

@ -39,6 +39,13 @@ public interface HighMerchantService {
*/
HighMerchantModel getMerchantById(Long id);
/**
* 根据id 查询
* @param id
* @return
*/
HighMerchant getDetailById(Long id);
/**
* 查询列表
* @param map

@ -94,6 +94,11 @@ public class HighMerchantServiceImpl implements HighMerchantService {
return merchantModel;
}
@Override
public HighMerchant getDetailById(Long id) {
return highMerchantMapper.selectByPrimaryKey(id);
}
@Override
public List<HighMerchant> getMerchantList(Map<String, Object> map) {
HighMerchantExample example = new HighMerchantExample();

Loading…
Cancel
Save