记得上下班打卡 | git大法好,push需谨慎

Commit 6a89586f authored by GaoHu's avatar GaoHu

exit

parent 726ce473
package com.liquidnet.client.admin.web.controller.zhengzai.smile;
import com.github.pagehelper.PageInfo;
import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.core.page.TableDataInfo;
import com.liquidnet.client.admin.zhengzai.smile.dto.ShowSort;
import com.liquidnet.client.admin.zhengzai.smile.dto.ShowVo;
import com.liquidnet.client.admin.zhengzai.smile.dto.SmilePriceParam;
import com.liquidnet.client.admin.zhengzai.smile.dto.SmileShowParam;
import com.liquidnet.client.admin.zhengzai.smile.service.ISmileShowService;
......@@ -53,8 +51,8 @@ public class SmileShowController {
@PostMapping("/allPrice")
@ApiOperation("演出标识打款")
public AjaxResult allPrice(String performancesId){
return smileShowService.allPrice(performancesId);
public AjaxResult allPrice(@RequestBody SmilePriceParam smilePriceParam){
return smileShowService.allPrice(smilePriceParam);
}
@PostMapping("/saleData")
......
......@@ -30,7 +30,6 @@ public class SmilePriceParam implements Serializable {
* 用户id
*/
@ApiModelProperty(value = "用户uid")
@NotBlank(message = "用户id不能为空")
private String uid;
@ApiModelProperty(value = "打款标识0打款,1未打款")
......
......@@ -29,5 +29,5 @@ public interface ISmileShowService extends IService<SmileSchool> {
AjaxResult saleData(String performancesId);
AjaxResult allPrice(String performancesId);
AjaxResult allPrice(SmilePriceParam smilePriceParam);
}
......@@ -294,6 +294,10 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
if (!StringUtils.isEmpty(performancesId)) {
SaleDataVo saleDataVo = new SaleDataVo();
//演出id
saleDataVo.setPerformancesId(performancesId);
//演出名称
//设置演出状态
saleDataVo.setPriceStatus(smileRedisUtils.getShowPriceId(performancesId));
List<SmileAgent> smileAgents = getSmileAgentsByProId(performancesId);
......@@ -327,9 +331,20 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
}
@Override
public AjaxResult allPrice(String performancesId) {
//缓存redis
smileRedisUtils.setShowPriceId(performancesId);
public AjaxResult allPrice(SmilePriceParam smilePriceParam) {
Integer showPriceId = smileRedisUtils.getShowPriceId(smilePriceParam.getPerformancesId());
//判断打款标识
if (smilePriceParam.getStatus().equals(showPriceId)){
return AjaxResult.warn("不可重复提交");
}
if (smilePriceParam.getStatus().equals(0)){
//打款
smileRedisUtils.setShowPriceId(smilePriceParam.getPerformancesId());
//
}else {
//未打款
smileRedisUtils.delShowPriceId(smilePriceParam.getPerformancesId());
}
return AjaxResult.success();
}
......
......@@ -99,7 +99,7 @@ public class SmileRedisUtils {
* 总共演出打款
*/
public void setShowPriceId(String performancesId){
redisDataSourceUtil.getRedisSweetUtil().set(SmileRedisConst.SELL_SHOW_PAYMENT.concat(performancesId),1);
redisDataSourceUtil.getRedisSweetUtil().set(SmileRedisConst.SELL_SHOW_PAYMENT.concat(performancesId),0);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment