|
|
@ -21,11 +21,9 @@ import com.hai.entity.HighOrder; |
|
|
|
import com.hai.entity.HighTyAgent; |
|
|
|
import com.hai.entity.HighTyAgent; |
|
|
|
import com.hai.entity.HighTySalesman; |
|
|
|
import com.hai.entity.HighTySalesman; |
|
|
|
import com.hai.entity.OutRechargeOrder; |
|
|
|
import com.hai.entity.OutRechargeOrder; |
|
|
|
|
|
|
|
import com.hai.enum_type.UserObjectTypeEnum; |
|
|
|
import com.hai.model.*; |
|
|
|
import com.hai.model.*; |
|
|
|
import com.hai.service.HighCouponCodeService; |
|
|
|
import com.hai.service.*; |
|
|
|
import com.hai.service.HighOrderService; |
|
|
|
|
|
|
|
import com.hai.service.HighTyAgentService; |
|
|
|
|
|
|
|
import com.hai.service.HighTySalesmanService; |
|
|
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
|
import org.apache.commons.collections4.MapUtils; |
|
|
@ -59,6 +57,9 @@ public class HighOrderController { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private HighOrderService highOrderService; |
|
|
|
private HighOrderService highOrderService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private HighCouponService couponService; |
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private HighCouponCodeService highCouponCodeService; |
|
|
|
private HighCouponCodeService highCouponCodeService; |
|
|
|
|
|
|
|
|
|
|
@ -133,7 +134,20 @@ public class HighOrderController { |
|
|
|
HttpServletRequest request) { |
|
|
|
HttpServletRequest request) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); |
|
|
|
|
|
|
|
if (userInfoModel == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) { |
|
|
|
|
|
|
|
map.put("goodsId", couponService.getCouponIdsByCompanyId(userInfoModel.getBsCompany().getId())); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
map.put("orderNo", orderNo); |
|
|
|
map.put("orderNo", orderNo); |
|
|
|
map.put("memPhone", memPhone); |
|
|
|
map.put("memPhone", memPhone); |
|
|
|
map.put("couponName", couponName); |
|
|
|
map.put("couponName", couponName); |
|
|
@ -172,7 +186,18 @@ public class HighOrderController { |
|
|
|
HttpServletRequest request) { |
|
|
|
HttpServletRequest request) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); |
|
|
|
|
|
|
|
if (userInfoModel == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
|
|
|
} |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type0.getType())) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (userInfoModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type1.getType())) { |
|
|
|
|
|
|
|
map.put("goodsId", couponService.getCouponIdsByCompanyId(userInfoModel.getBsCompany().getId())); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); |
|
|
|
|
|
|
|
} |
|
|
|
map.put("orderNo", orderNo); |
|
|
|
map.put("orderNo", orderNo); |
|
|
|
map.put("memPhone", memPhone); |
|
|
|
map.put("memPhone", memPhone); |
|
|
|
map.put("couponName", couponName); |
|
|
|
map.put("couponName", couponName); |
|
|
|