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

Commit 2709a14a authored by GaoHu's avatar GaoHu

exit 删除旧版perIds存储方式

parent 64a4d4ac
...@@ -27,6 +27,8 @@ public class SmileAgentController { ...@@ -27,6 +27,8 @@ public class SmileAgentController {
@Autowired @Autowired
ISmileAgentService smileAgentService; ISmileAgentService smileAgentService;
private Boolean tag = true;
@PostMapping("/list") @PostMapping("/list")
@ApiOperation("根据PerId获取票提") @ApiOperation("根据PerId获取票提")
@ResponseBody @ResponseBody
...@@ -41,5 +43,17 @@ public class SmileAgentController { ...@@ -41,5 +43,17 @@ public class SmileAgentController {
return smileAgentService.create(smileAgents); return smileAgentService.create(smileAgents);
} }
@PostMapping("/delPerId")
@ApiOperation("删除(旧版)演出id集合")
@ResponseBody
public AjaxResult delPerId(){
if (tag){
smileAgentService.delPerId();
tag = false;
return AjaxResult.success();
}
return AjaxResult.warn("已删除");
}
} }
...@@ -30,4 +30,6 @@ public interface ISmileAgentService extends IService<SmileAgent> { ...@@ -30,4 +30,6 @@ public interface ISmileAgentService extends IService<SmileAgent> {
* @return :AjaxResult * @return :AjaxResult
*/ */
AjaxResult getAgent(String performancesId); AjaxResult getAgent(String performancesId);
void delPerId();
} }
...@@ -88,4 +88,9 @@ public class SmileAgentServiceImpl extends ServiceImpl<SmileAgentMapper, SmileAg ...@@ -88,4 +88,9 @@ public class SmileAgentServiceImpl extends ServiceImpl<SmileAgentMapper, SmileAg
} }
return AjaxResult.warn("演出未开启代理"); return AjaxResult.warn("演出未开启代理");
} }
@Override
public void delPerId() {
smileRedisUtils.delShow();
}
} }
...@@ -10,7 +10,9 @@ import com.liquidnet.service.goblin.dto.vo.SmileSchoolVo; ...@@ -10,7 +10,9 @@ import com.liquidnet.service.goblin.dto.vo.SmileSchoolVo;
import com.liquidnet.service.goblin.dto.vo.SmileSellDataVO; import com.liquidnet.service.goblin.dto.vo.SmileSellDataVO;
import com.liquidnet.service.goblin.dto.vo.SmileUserVO; import com.liquidnet.service.goblin.dto.vo.SmileUserVO;
import com.liquidnet.service.smile.entity.SmileVolunteersTeam; import com.liquidnet.service.smile.entity.SmileVolunteersTeam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -18,6 +20,7 @@ import java.util.ArrayList; ...@@ -18,6 +20,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@Component @Component
@Slf4j
public class SmileRedisUtils { public class SmileRedisUtils {
@Autowired @Autowired
...@@ -97,6 +100,19 @@ public class SmileRedisUtils { ...@@ -97,6 +100,19 @@ public class SmileRedisUtils {
} }
} }
public void delShow(){
String rdk = SmileRedisConst.SMILE_SHOW;
Object obj = getRedis().get(rdk);
if (obj != null) {
try {
List<String> obj1 = (List<String>) obj;
} catch (Exception e) {
log.debug("不是新存ids,需要删除!");
getRedis().del(rdk);
}
}
}
/** /**
* 保存个人打款 * 保存个人打款
*/ */
......
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