用户经验值设置
This commit is contained in:
parent
e379a2eb34
commit
bbe01e9e67
@ -112,9 +112,6 @@ public class DraftGoods extends BaseEntity {
|
||||
@ApiModelProperty(value = "运费模板id")
|
||||
private String templateId;
|
||||
|
||||
@ApiModelProperty(value = "运费承担者")
|
||||
private String freightPayer;
|
||||
|
||||
@ApiModelProperty(value = "是否自营")
|
||||
private Boolean selfOperated;
|
||||
/**
|
||||
|
@ -66,9 +66,6 @@ public class GoodsOperationDTO implements Serializable {
|
||||
@Max(value = 99999999, message = "重量不能超过99999999")
|
||||
private Double weight;
|
||||
|
||||
@ApiModelProperty(value = "谁承担运费 BUYER:买家承担,STORE:卖家承担", required = true)
|
||||
private String freightPayer;
|
||||
|
||||
@ApiModelProperty(value = "详情")
|
||||
private String intro;
|
||||
|
||||
|
@ -109,11 +109,10 @@ public interface GoodsService extends IService<Goods> {
|
||||
* 设置商品运费模板
|
||||
*
|
||||
* @param goodsIds 商品列表
|
||||
* @param freightPayer 承担运费者
|
||||
* @param templateId 运费模板ID
|
||||
* @return 操作结果
|
||||
*/
|
||||
Boolean freight(List<String> goodsIds, String freightPayer, String templateId);
|
||||
Boolean freight(List<String> goodsIds, String templateId);
|
||||
|
||||
/**
|
||||
* 修改商品库存数量
|
||||
|
@ -272,7 +272,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean freight(List<String> goodsIds, String freightPayer, String templateId) {
|
||||
public Boolean freight(List<String> goodsIds, String templateId) {
|
||||
LambdaUpdateWrapper<Goods> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
|
||||
lambdaUpdateWrapper.set(Goods::getTemplateId, templateId);
|
||||
lambdaUpdateWrapper.in(Goods::getId, goodsIds);
|
||||
|
@ -237,7 +237,9 @@ public class PointsGoodsServiceImpl extends ServiceImpl<PointsGoodsMapper, Point
|
||||
* @param pointsGoods 积分商品信息
|
||||
*/
|
||||
private void addPointsGoodsPromotionTask(PointsGoodsVO pointsGoods) {
|
||||
PromotionMessage promotionMessage = new PromotionMessage(pointsGoods.getId(), PromotionTypeEnum.POINTS_GOODS.name(), PromotionStatusEnum.START.name(), pointsGoods.getStartTime(), pointsGoods.getEndTime());
|
||||
PromotionMessage promotionMessage = new PromotionMessage(pointsGoods.getId(), PromotionTypeEnum.POINTS_GOODS.name(),
|
||||
PromotionStatusEnum.START.name(),
|
||||
pointsGoods.getStartTime(), pointsGoods.getEndTime());
|
||||
TimeTriggerMsg timeTriggerMsg = new TimeTriggerMsg(TimeExecuteConstant.PROMOTION_EXECUTOR,
|
||||
promotionMessage.getStartTime().getTime(),
|
||||
promotionMessage,
|
||||
|
@ -14,6 +14,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
@ -45,6 +46,18 @@ public class MemberGradeManagerController {
|
||||
return ResultUtil.data(memberGradeService.page(PageUtil.initPage(page)));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加会员等级")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "会员等级ID", required = true, paramType = "path")
|
||||
})
|
||||
@GetMapping(value = "/add")
|
||||
public ResultMessage<Object> daa(@Validated MemberGrade memberGrade) {
|
||||
if (memberGradeService.updateById(memberGrade)) {
|
||||
return ResultUtil.success(ResultCode.SUCCESS);
|
||||
}
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改会员等级")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "会员等级ID", required = true, paramType = "path")
|
||||
@ -57,9 +70,11 @@ public class MemberGradeManagerController {
|
||||
throw new ServiceException(ResultCode.ERROR);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "删除会员等级")
|
||||
@ApiImplicitParam(name = "id", value = "会员等级ID", required = true, dataType = "String", paramType = "path")
|
||||
@PutMapping(value = "/delete/{id}")
|
||||
@DeleteMapping(value = "/delete/{id}")
|
||||
public ResultMessage<IPage<Object>> delete(@PathVariable String id) {
|
||||
if(memberGradeService.getById(id).getIsDefault()){
|
||||
throw new ServiceException(ResultCode.USER_GRADE_IS_DEFAULT);
|
||||
|
@ -36,11 +36,10 @@ public class PointsGoodsManagerController {
|
||||
@PostMapping(consumes = "application/json", produces = "application/json")
|
||||
@ApiOperation(value = "添加积分商品")
|
||||
public ResultMessage<Object> addPointsGoods(@RequestBody List<PointsGoodsVO> pointsGoodsList) {
|
||||
AuthUser currentUser = UserContext.getCurrentUser();
|
||||
List<PointsGoodsVO> collect = new ArrayList<>();
|
||||
for (PointsGoodsVO i : pointsGoodsList) {
|
||||
i.setStoreName(i.getGoodsSku().getStoreName());
|
||||
i.setStoreId(currentUser.getId());
|
||||
i.setStoreId(UserContext.getCurrentUser().getStoreId());
|
||||
collect.add(i);
|
||||
}
|
||||
pointsGoodsService.addPointsGoods(collect);
|
||||
|
@ -46,7 +46,7 @@ public class SettingManagerController {
|
||||
"WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," +
|
||||
"QQ_WEB_CONNECT,QQ_APP_CONNECT," +
|
||||
"QQ_WEB_CONNECT,QQ_APP_CONNECT,WEIBO_CONNECT,ALIPAY_CONNECT," +
|
||||
"PAYMENT_SUPPORT,ALIPAY_PAYMENT,WECHAT_PAYMENT,SECKILL_SETTING")
|
||||
"PAYMENT_SUPPORT,ALIPAY_PAYMENT,WECHAT_PAYMENT,SECKILL_SETTING,EXPERIENCE_SETTING")
|
||||
public ResultMessage saveConfig(@PathVariable String key, @RequestBody String configValue) {
|
||||
SettingEnum settingEnum = SettingEnum.valueOf(key);
|
||||
//获取系统配置
|
||||
@ -92,7 +92,7 @@ public class SettingManagerController {
|
||||
"WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," +
|
||||
"QQ_WEB_CONNECT,QQ_APP_CONNECT," +
|
||||
"QQ_WEB_CONNECT,QQ_APP_CONNECT,WEIBO_CONNECT,ALIPAY_CONNECT," +
|
||||
"PAYMENT_SUPPORT,ALIPAY_PAYMENT,WECHAT_PAYMENT,SECKILL_SETTING"
|
||||
"PAYMENT_SUPPORT,ALIPAY_PAYMENT,WECHAT_PAYMENT,SECKILL_SETTING,EXPERIENCE_SETTING"
|
||||
)
|
||||
public ResultMessage settingGet(@PathVariable String key) {
|
||||
return createSetting(key);
|
||||
@ -175,6 +175,10 @@ public class SettingManagerController {
|
||||
return setting == null ?
|
||||
ResultUtil.data(new SeckillSetting()) :
|
||||
ResultUtil.data(JSONUtil.toBean(setting.getSettingValue(), SeckillSetting.class));
|
||||
case EXPERIENCE_SETTING:
|
||||
return setting == null ?
|
||||
ResultUtil.data(new ExperienceSetting()) :
|
||||
ResultUtil.data(JSONUtil.toBean(setting.getSettingValue(), ExperienceSetting.class));
|
||||
default:
|
||||
throw new ServiceException(ResultCode.SETTING_NOT_TO_SET);
|
||||
}
|
||||
|
@ -139,11 +139,10 @@ public class GoodsStoreController {
|
||||
@PutMapping(value = "/freight")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "query", allowMultiple = true),
|
||||
@ApiImplicitParam(name = "freightPayer", value = "运费承担者", required = true, paramType = "query"),
|
||||
@ApiImplicitParam(name = "templateId", value = "运费模板ID", required = true, paramType = "query")
|
||||
})
|
||||
public ResultMessage<Object> freight(@RequestParam List<String> goodsId, @RequestParam String freightPayer, @RequestParam String templateId) {
|
||||
goodsService.freight(goodsId, freightPayer, templateId);
|
||||
public ResultMessage<Object> freight(@RequestParam List<String> goodsId, @RequestParam String templateId) {
|
||||
goodsService.freight(goodsId, templateId);
|
||||
return ResultUtil.success();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user