用户经验值设置

This commit is contained in:
lifenlong 2021-06-05 17:13:04 +08:00
parent e379a2eb34
commit bbe01e9e67
9 changed files with 30 additions and 18 deletions

View File

@ -112,9 +112,6 @@ public class DraftGoods extends BaseEntity {
@ApiModelProperty(value = "运费模板id") @ApiModelProperty(value = "运费模板id")
private String templateId; private String templateId;
@ApiModelProperty(value = "运费承担者")
private String freightPayer;
@ApiModelProperty(value = "是否自营") @ApiModelProperty(value = "是否自营")
private Boolean selfOperated; private Boolean selfOperated;
/** /**

View File

@ -66,9 +66,6 @@ public class GoodsOperationDTO implements Serializable {
@Max(value = 99999999, message = "重量不能超过99999999") @Max(value = 99999999, message = "重量不能超过99999999")
private Double weight; private Double weight;
@ApiModelProperty(value = "谁承担运费 BUYER买家承担STORE卖家承担", required = true)
private String freightPayer;
@ApiModelProperty(value = "详情") @ApiModelProperty(value = "详情")
private String intro; private String intro;

View File

@ -109,11 +109,10 @@ public interface GoodsService extends IService<Goods> {
* 设置商品运费模板 * 设置商品运费模板
* *
* @param goodsIds 商品列表 * @param goodsIds 商品列表
* @param freightPayer 承担运费者
* @param templateId 运费模板ID * @param templateId 运费模板ID
* @return 操作结果 * @return 操作结果
*/ */
Boolean freight(List<String> goodsIds, String freightPayer, String templateId); Boolean freight(List<String> goodsIds, String templateId);
/** /**
* 修改商品库存数量 * 修改商品库存数量

View File

@ -272,7 +272,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
} }
@Override @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<Goods> lambdaUpdateWrapper = Wrappers.lambdaUpdate();
lambdaUpdateWrapper.set(Goods::getTemplateId, templateId); lambdaUpdateWrapper.set(Goods::getTemplateId, templateId);
lambdaUpdateWrapper.in(Goods::getId, goodsIds); lambdaUpdateWrapper.in(Goods::getId, goodsIds);

View File

@ -237,7 +237,9 @@ public class PointsGoodsServiceImpl extends ServiceImpl<PointsGoodsMapper, Point
* @param pointsGoods 积分商品信息 * @param pointsGoods 积分商品信息
*/ */
private void addPointsGoodsPromotionTask(PointsGoodsVO 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, TimeTriggerMsg timeTriggerMsg = new TimeTriggerMsg(TimeExecuteConstant.PROMOTION_EXECUTOR,
promotionMessage.getStartTime().getTime(), promotionMessage.getStartTime().getTime(),
promotionMessage, promotionMessage,

View File

@ -14,6 +14,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
/** /**
@ -45,6 +46,18 @@ public class MemberGradeManagerController {
return ResultUtil.data(memberGradeService.page(PageUtil.initPage(page))); 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 = "修改会员等级") @ApiOperation(value = "修改会员等级")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "会员等级ID", required = true, paramType = "path") @ApiImplicitParam(name = "id", value = "会员等级ID", required = true, paramType = "path")
@ -57,9 +70,11 @@ public class MemberGradeManagerController {
throw new ServiceException(ResultCode.ERROR); throw new ServiceException(ResultCode.ERROR);
} }
@ApiOperation(value = "删除会员等级") @ApiOperation(value = "删除会员等级")
@ApiImplicitParam(name = "id", value = "会员等级ID", required = true, dataType = "String", paramType = "path") @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) { public ResultMessage<IPage<Object>> delete(@PathVariable String id) {
if(memberGradeService.getById(id).getIsDefault()){ if(memberGradeService.getById(id).getIsDefault()){
throw new ServiceException(ResultCode.USER_GRADE_IS_DEFAULT); throw new ServiceException(ResultCode.USER_GRADE_IS_DEFAULT);

View File

@ -36,11 +36,10 @@ public class PointsGoodsManagerController {
@PostMapping(consumes = "application/json", produces = "application/json") @PostMapping(consumes = "application/json", produces = "application/json")
@ApiOperation(value = "添加积分商品") @ApiOperation(value = "添加积分商品")
public ResultMessage<Object> addPointsGoods(@RequestBody List<PointsGoodsVO> pointsGoodsList) { public ResultMessage<Object> addPointsGoods(@RequestBody List<PointsGoodsVO> pointsGoodsList) {
AuthUser currentUser = UserContext.getCurrentUser();
List<PointsGoodsVO> collect = new ArrayList<>(); List<PointsGoodsVO> collect = new ArrayList<>();
for (PointsGoodsVO i : pointsGoodsList) { for (PointsGoodsVO i : pointsGoodsList) {
i.setStoreName(i.getGoodsSku().getStoreName()); i.setStoreName(i.getGoodsSku().getStoreName());
i.setStoreId(currentUser.getId()); i.setStoreId(UserContext.getCurrentUser().getStoreId());
collect.add(i); collect.add(i);
} }
pointsGoodsService.addPointsGoods(collect); pointsGoodsService.addPointsGoods(collect);

View File

@ -46,7 +46,7 @@ public class SettingManagerController {
"WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," + "WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," +
"QQ_WEB_CONNECT,QQ_APP_CONNECT," + "QQ_WEB_CONNECT,QQ_APP_CONNECT," +
"QQ_WEB_CONNECT,QQ_APP_CONNECT,WEIBO_CONNECT,ALIPAY_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) { public ResultMessage saveConfig(@PathVariable String key, @RequestBody String configValue) {
SettingEnum settingEnum = SettingEnum.valueOf(key); SettingEnum settingEnum = SettingEnum.valueOf(key);
//获取系统配置 //获取系统配置
@ -92,7 +92,7 @@ public class SettingManagerController {
"WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," + "WECHAT_PC_CONNECT,WECHAT_WAP_CONNECT,WECHAT_APP_CONNECT,WECHAT_MP_CONNECT," +
"QQ_WEB_CONNECT,QQ_APP_CONNECT," + "QQ_WEB_CONNECT,QQ_APP_CONNECT," +
"QQ_WEB_CONNECT,QQ_APP_CONNECT,WEIBO_CONNECT,ALIPAY_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) { public ResultMessage settingGet(@PathVariable String key) {
return createSetting(key); return createSetting(key);
@ -175,6 +175,10 @@ public class SettingManagerController {
return setting == null ? return setting == null ?
ResultUtil.data(new SeckillSetting()) : ResultUtil.data(new SeckillSetting()) :
ResultUtil.data(JSONUtil.toBean(setting.getSettingValue(), SeckillSetting.class)); 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: default:
throw new ServiceException(ResultCode.SETTING_NOT_TO_SET); throw new ServiceException(ResultCode.SETTING_NOT_TO_SET);
} }

View File

@ -139,11 +139,10 @@ public class GoodsStoreController {
@PutMapping(value = "/freight") @PutMapping(value = "/freight")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "goodsId", value = "商品ID", required = true, paramType = "query", allowMultiple = true), @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") @ApiImplicitParam(name = "templateId", value = "运费模板ID", required = true, paramType = "query")
}) })
public ResultMessage<Object> freight(@RequestParam List<String> goodsId, @RequestParam String freightPayer, @RequestParam String templateId) { public ResultMessage<Object> freight(@RequestParam List<String> goodsId, @RequestParam String templateId) {
goodsService.freight(goodsId, freightPayer, templateId); goodsService.freight(goodsId, templateId);
return ResultUtil.success(); return ResultUtil.success();
} }