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