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

Commit 27f87760 authored by GaoHu's avatar GaoHu

exit

parent cbf596e6
......@@ -14,6 +14,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.List;
/**
......@@ -102,4 +106,24 @@ public class SmileUserController extends BaseController {
public AjaxResult redisDelUserByUid(String uid) {
return iSmileUserService.redisDelUserByUid(uid);
}
@RequestMapping("getAreaJson")
public String getAreaJson(){
String jsonStr = "";
try {
File jsonFile = new File("classPath:");
Reader reader = new InputStreamReader(new FileInputStream(jsonFile), "utf-8");
int ch = 0;
StringBuffer sb = new StringBuffer();
while ((ch = reader.read()) != -1) {
sb.append((char) ch);
}
reader.close();
jsonStr = sb.toString();
return jsonStr;
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
}
......@@ -591,8 +591,10 @@ public class KylinPerformancesAdminServiceImpl extends ServiceImpl<KylinPerforma
performanceVoUtils.performanceVoStatus(performancesId);
//开启/关闭代理存 redis
if (status.equals(1)) {
// String shows = (String)smileRedisUtils.get(SmileRedisConst.SMILE_SHOW);
smileRedisUtils.lSet(SmileRedisConst.SMILE_SHOW.concat(":").concat(performancesId),ticketId);
}else {
// smileRedisUtils.lRemove(SmileRedisConst.SMILE_SHOW,)
smileRedisUtils.lRemove(SmileRedisConst.SMILE_SHOW.concat(":").concat(performancesId), 1, ticketId);
}
return true;
......
......@@ -141,7 +141,7 @@ public class SmileShowServiceImpl extends ServiceImpl<SmileSchoolMapper, SmileSc
//获取排序演出id
List<String> collect = kylinPerformancesMapper.selectByComment().stream().map(KylinPerformances::getPerformancesId).collect(Collectors.toList());
String perId = StringUtils.strip(collect.toString(), "[]");
String perId = StringUtils.join(collect,",");
smileRedisUtils.set(SmileRedisConst.SMILE_SHOW, perId);
log.info("redis show key:{}", perId);
return AjaxResult.success();
......
......@@ -85,15 +85,6 @@
<collection column="total_general" property="totalGeneral" />
</resultMap>
<resultMap id="showAgentDao" type="com.liquidnet.service.kylin.dao.ShowAgentDao">
<collection column="id" property="id"/>
<collection column="performance_id" property="performanceId"/>
<collection column="ticket_id" property="ticketId"/>
<collection column="title" property="title"/>
<collection column="total_carry" property="totalCarry"/>
<collection column="ord_carry" property="ordCarry"/>
</resultMap>
<select id="selectTicketsByIds" resultMap="ticketAndStatusDao">
select
kt.mid,
......@@ -112,6 +103,15 @@
</foreach>
</select>
<resultMap id="showAgentDao" type="com.liquidnet.service.kylin.dao.ShowAgentDao">
<collection column="id" property="id"/>
<collection column="performance_id" property="performanceId"/>
<collection column="ticket_id" property="ticketId"/>
<collection column="title" property="title"/>
<collection column="total_carry" property="totalCarry"/>
<collection column="ord_carry" property="ordCarry"/>
</resultMap>
<select id="selectOneByPerIdAndTicketId" resultMap="showAgentDao">
SELECT sa.id,
sa.performance_id,
......
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