anderx 5 years ago
parent
commit
aebea59c2b

+ 0 - 36
src/main/java/com/goafanti/common/dao/StarMapper.java

@@ -1,36 +0,0 @@
-package com.goafanti.common.dao;
-
-import java.util.List;
-
-import com.goafanti.common.model.Star;
-import com.goafanti.star.bo.BigShotStarInterest;
-import com.goafanti.star.bo.BigShotStarListBo;
-import com.goafanti.star.bo.HotStarListBo;
-
-public interface StarMapper {
-    int deleteByPrimaryKey(String id);
-
-    int insert(Star record);
-
-    int insertSelective(Star record);
-
-    Star selectByPrimaryKey(String id);
-
-    int updateByPrimaryKeySelective(Star record);
-
-    int updateByPrimaryKey(Star record);
-
-	List<HotStarListBo> listHostStar();
-
-	List<HotStarListBo> listStarList(String uid);
-
-	void deleteAll();
-
-	void insertBatch(List<Star> startList);
-
-	List<BigShotStarListBo> listBigShotStar();
-
-	List<BigShotStarInterest> findBigShotInterestStatus(String uid);
-
-	List<BigShotStarInterest> findStarInterestStatus(String uid);
-}

+ 0 - 189
src/main/java/com/goafanti/common/mapper/StarMapper.xml

@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
-<mapper namespace="com.goafanti.common.dao.StarMapper" >
-  <resultMap id="BaseResultMap" type="com.goafanti.common.model.Star" >
-    <id column="id" property="id" jdbcType="VARCHAR" />
-    <result column="uid" property="uid" jdbcType="VARCHAR" />
-    <result column="hot" property="hot" jdbcType="INTEGER" />
-    <result column="star" property="star" jdbcType="INTEGER" />
-    <result column="portal_url" property="portalUrl" jdbcType="VARCHAR" />
-  </resultMap>
-  <sql id="Base_Column_List" >
-    id, uid, hot, star, portal_url
-  </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select 
-    <include refid="Base_Column_List" />
-    from star
-    where id = #{id,jdbcType=VARCHAR}
-  </select>
-  <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
-    delete from star
-    where id = #{id,jdbcType=VARCHAR}
-  </delete>
-  <insert id="insert" parameterType="com.goafanti.common.model.Star" >
-    insert into star (id, uid, hot, 
-      star, portal_url)
-    values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{hot,jdbcType=INTEGER}, 
-      #{star,jdbcType=INTEGER}, #{portalUrl,jdbcType=VARCHAR})
-  </insert>
-  <insert id="insertSelective" parameterType="com.goafanti.common.model.Star" >
-    insert into star
-    <trim prefix="(" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        id,
-      </if>
-      <if test="uid != null" >
-        uid,
-      </if>
-      <if test="hot != null" >
-        hot,
-      </if>
-      <if test="star != null" >
-        star,
-      </if>
-      <if test="portalUrl != null" >
-        portal_url,
-      </if>
-    </trim>
-    <trim prefix="values (" suffix=")" suffixOverrides="," >
-      <if test="id != null" >
-        #{id,jdbcType=VARCHAR},
-      </if>
-      <if test="uid != null" >
-        #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="hot != null" >
-        #{hot,jdbcType=INTEGER},
-      </if>
-      <if test="star != null" >
-        #{star,jdbcType=INTEGER},
-      </if>
-      <if test="portalUrl != null" >
-        #{portalUrl,jdbcType=VARCHAR},
-      </if>
-    </trim>
-  </insert>
-  <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Star" >
-    update star
-    <set >
-      <if test="uid != null" >
-        uid = #{uid,jdbcType=VARCHAR},
-      </if>
-      <if test="hot != null" >
-        hot = #{hot,jdbcType=INTEGER},
-      </if>
-      <if test="star != null" >
-        star = #{star,jdbcType=INTEGER},
-      </if>
-      <if test="portalUrl != null" >
-        portal_url = #{portalUrl,jdbcType=VARCHAR},
-      </if>
-    </set>
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Star" >
-    update star
-    set uid = #{uid,jdbcType=VARCHAR},
-      hot = #{hot,jdbcType=INTEGER},
-      star = #{star,jdbcType=INTEGER},
-      portal_url = #{portalUrl,jdbcType=VARCHAR}
-    where id = #{id,jdbcType=VARCHAR}
-  </update>
-  
-  <select id="listHostStar"  resultType="com.goafanti.star.bo.HotStarListBo">
-  	select
-  		u.id as uid,
-  		u.number,
-  		ui.username,
-  		uc.engaged_field as engagedField,
-  		uc.professional_title as professionalTitle,
-  		uc.work_unit as workUnit,
-  		adc.achievement_count as achievementNum
-  	from star s
-  	left join user u on u.id = s.uid
-  	left join user_identity ui on ui.uid = s.uid
-  	left join user_career uc on uc.uid = s.uid
-  	left join achievement_demand_count adc on adc.uid = s.uid 
-  	where s.hot = 1 and ui.celebrity = 1
-  	order by adc.achievement_count desc
-  </select>
-  
-  <select id="listStarList"  parameterType="java.lang.String" resultType="com.goafanti.star.bo.HotStarListBo">
-  	select
-  		u.id as uid,
-  		u.number,
-  		ui.username,
-  		uc.engaged_field as engagedField,
-  		uc.professional_title as professionalTitle,
-  		uc.work_unit as workUnit,
-  		adc.achievement_count as achievementNum,
-  		u.head_portrait_url as personPortraitUrl
-  	from star s
-  	left join user u on u.id = s.uid
-  	left join user_identity ui on ui.uid = s.uid
-  	left join user_career uc on uc.uid = s.uid
-  	left join achievement_demand_count adc on adc.uid = s.uid 
-  	<!-- left join user_info info on info.uid = s.uid -->
-  	left join user_interest interest on interest.to_uid = s.uid and interest.from_uid = #{uid,jdbcType=VARCHAR}
-  	where s.star = 1 and ui.celebrity = 1
-  	order by adc.achievement_count desc
-  </select>
-  
-  <delete id="deleteAll">
-  	delete from star
-  </delete>
-  
-   <insert id="insertBatch" parameterType="com.goafanti.common.model.Star">
-    insert into star (id, uid, hot, star, portal_url)
-    values 
-    <foreach item="item" index="index" collection="list" separator=",">
-      (
-      	#{item.id,jdbcType=VARCHAR}, #{item.uid,jdbcType=VARCHAR}, #{item.hot,jdbcType=INTEGER},
-      	#{item.star,jdbcType=INTEGER}, #{item.portalUrl,jdbcType=VARCHAR}
-      )
-    </foreach>
-  </insert>
-  
-  <select id="listBigShotStar" parameterType="java.lang.String" resultType="com.goafanti.star.bo.BigShotStarListBo">
-  	select
-  		u.id as uid,
-  		u.number,
-  		ui.username,
-  		uc.engaged_field as engagedField,
-  		uc.professional_title as professionalTitle,
-  		uc.work_unit as workUnit,
-  		adc.achievement_count as achievementNum,
-  		u.head_portrait_url as personPortraitUrl,
-  		interest.id as interestId
-  	from star s
-  	left join user u on u.id = s.uid
-  	left join user_info info on info.uid = s.uid
-  	left join user_identity ui on ui.uid = s.uid
-  	left join user_career uc on uc.uid = s.uid
-  	left join achievement_demand_count adc on adc.uid = s.uid 
-  	left join user_interest interest on interest.to_uid = s.uid and interest.from_uid = #{uid,jdbcType=VARCHAR}
-  	where s.hot = 1 
-  	order by adc.achievement_count desc
-  </select>
-  
-  <select id="findBigShotInterestStatus" parameterType="java.lang.String" resultType="com.goafanti.star.bo.BigShotStarInterest">
-  	select
-  		ui.id as interestId,
-  		s.uid as fromUid,
-  		ui.to_uid as toUid
-  	from star s
-  	left join user_interest ui on s.uid = ui.to_uid and ui.from_uid = #{uid,jdbcType=VARCHAR} 
-  	where  s.hot = 1 
-  </select>
-  
-  <select id="findStarInterestStatus" parameterType="java.lang.String" resultType="com.goafanti.star.bo.BigShotStarInterest">
-  	select
-  		ui.id as interestId,
-  		s.uid as fromUid,
-  		ui.to_uid as toUid
-  	from star s
-  	left join user_interest ui on s.uid = ui.to_uid and ui.from_uid = #{uid,jdbcType=VARCHAR} 
-  	where  s.star = 1 
-  </select>
-</mapper>

+ 4 - 0
src/main/java/com/goafanti/core/shiro/token/UserRealm.java

@@ -17,6 +17,7 @@ import org.apache.shiro.subject.PrincipalCollection;
 import org.apache.shiro.subject.SimplePrincipalCollection;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import com.alibaba.druid.support.logging.Log;
 import com.goafanti.admin.service.AdminService;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.AftUser;
@@ -78,11 +79,14 @@ public class UserRealm extends AuthorizingRealm {
 	protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
 		String userId = TokenManager.getAdminId();
 		SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
+			System.out.println("=============================获取权限");
 		// 根据用户ID查询角色(role),放入到Authorization里。
 		Set<String> roles = roleService.findRoleByUserId(userId);
+		System.out.println("============================role:" +roles.toString());
 		info.setRoles(roles);
 		// 根据用户ID查询权限(permission),放入到Authorization里。
 		Set<String> permissions = permissionService.findPermissionByUserId(userId);
+		System.out.println("============================permissions:" +permissions.toString());
 		info.setStringPermissions(permissions);
 		return info;
 	}

+ 1 - 22
src/main/java/com/goafanti/order/controller/AdminOrderApiController.java

@@ -278,29 +278,8 @@ public class AdminOrderApiController extends CertifyApiController {
 		return res;
 	}
 	
-	/**
-	 * 部门服务订单
-	 * @return
-	 */
-	@RequestMapping(value="/listDepServiceOrder" ,method = RequestMethod.POST)
-	public Result listDepServiceOrder(OrderListBo bo,String startDate,String endDate,Integer intention,Integer formal,
-			String depIds,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(orderServiceImpl.selectDepServiceOrder(bo, startDate, endDate, intention, formal, depIds, pageNo, pageSize));
-		return res;
-	}
 	
-	/**
-	 * 查询特批订单
-	 * @return
-	 */
-	@RequestMapping(value="/listApprovalServiceOrder" ,method = RequestMethod.POST)
-	public Result listApprovalServiceOrder(OrderListBo bo,String startDate,String endDate,
-			String depIds,Integer approvalHistory,Integer pageNo, Integer pageSize){
-		Result res = new Result();
-		res.setData(orderServiceImpl.selectApprovalServiceOrder(bo, startDate, endDate, depIds, approvalHistory, pageNo, pageSize));
-		return res;
-	}
+	
 	
 	
 	

+ 1 - 29
src/main/java/com/goafanti/order/service/OrderService.java

@@ -175,35 +175,7 @@ public interface OrderService {
 	 */
 	List<OrganizationManagement> selectMyDeps();
 	
-	/**
-	 * 
-	 * @param bo
-	 * @param startDate 开始时间
-	 * @param endDate 结束时间
-	 * @param intention 是否包含意向
-	 * @param formal 是否包含正式
-	 * @param depIds 部门id
-	 * @param history 是否包含历史
-	 * @param pageNo 
-	 * @param pageSize
-	 * @return
-	 */
-	Pagination<OrderListBo> selectDepServiceOrder(OrderListBo bo,String startDate,String endDate,Integer intention,Integer formal,
-			String depIds,Integer pageNo, Integer pageSize);
-	
-	/**
-	 * 
-	 * @param bo
-	 * @param startDate 开始时间
-	 * @param endDate 结束时间
-	 * @param depIds 部门id
-	 * @param history 是否包含历史
-	 * @param pageNo 
-	 * @param pageSize
-	 * @return
-	 */
-	Pagination<OrderListBo> selectApprovalServiceOrder(OrderListBo bo,String startDate,String endDate,
-			String depIds,Integer approvalHistory,Integer pageNo, Integer pageSize);
+
 
 	/**
 	 * 创建订单

+ 2 - 63
src/main/java/com/goafanti/order/service/impl/OrderServiceImpl.java

@@ -1161,70 +1161,9 @@ public class OrderServiceImpl extends BaseMybatisDao<TOrderMapper> implements Or
 		return allData;
 	}
 
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<OrderListBo> selectDepServiceOrder(OrderListBo bo, String startDate, String endDate,
-			Integer intention, Integer formal, String depIds,Integer pageNo, Integer pageSize) {
-		Map<String,Object> params = disposeParams(bo,startDate,endDate);
-		if(StringUtils.isNotBlank(depIds)) {
-			if(!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.APPROVAL_DECISION)){
-				params.put("depIds","'" + depIds.replace(",", "','") + "'");
-			}else{
-				if(!depIds.contains(",")) params.put("depIds","'" + depIds + "'");
-			}
-				
-		}else{
-			if(!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.APPROVAL_DECISION))
-				return new Pagination<OrderListBo>();
-		}
-		if((1 == intention && 0 == formal) || ( 0 == intention && 1 == formal)){
-			params.put("intention", intention);
-			params.put("formal", formal);
-		}else if(0 == intention && 0 == formal){
-			return new Pagination<OrderListBo>();
-		}
-		Pagination<OrderListBo> data = (Pagination<OrderListBo>)findPage("selectServiceOrderByPage","selectServiceOrderCount", 
-				params, pageNo, pageSize);
-		TOrder tOrder = null;
-		List<OrderListBo> list = (List<OrderListBo>)data.getList();
-		for(OrderListBo olb:list){
-			tOrder = new TOrder();
-			try {
-				BeanUtilsExt.copyProperties(tOrder, olb);
-				tOrder.setActuallyTotalAmount(olb.getActuallyTotalAmount());
-			} catch (InvocationTargetException | IllegalAccessException e) {
-				e.printStackTrace();
-			}
-			olb.setActive(setOperatorActive(tOrder));
-		}
-		data.setList(list);
-		return data;
-	}
 
-	@SuppressWarnings("unchecked")
-	@Override
-	public Pagination<OrderListBo> selectApprovalServiceOrder(OrderListBo bo, String startDate, String endDate,
-			String depIds,Integer approvalHistory, Integer pageNo, Integer pageSize) {
-		Map<String,Object> params = disposeParams(bo,startDate,endDate);
-		if(StringUtils.isNotBlank(depIds)) {
-			params.put("depIds", "'" + depIds + "'");
-		}else{
-			if(!TokenManager.hasRole(AFTConstants.SUPERADMIN) && !TokenManager.hasRole(AFTConstants.APPROVAL_DECISION))
-				return new Pagination<OrderListBo>();
-		}
-		if(approvalHistory != null){
-			params.put("approvalHistory", approvalHistory);
-		}
-		if(StringUtils.isNotBlank(bo.getBuyerName())) params.put("buyerName", bo.getBuyerName());
-		if(bo.getOrderType() != null) params.put("orderType", bo.getOrderType());
-		if(bo.getOrderChannel() != null) params.put("orderChannel", bo.getOrderChannel());
-		if(bo.getOrderStatus() != null) params.put("orderStatus", bo.getOrderStatus());
-		if(StringUtils.isNotBlank(startDate)) params.put("startDate", startDate);
-		if(StringUtils.isNotBlank(endDate)) params.put("endDate", endDate);
-		params.put("deleteStatus", 1);
-		return  (Pagination<OrderListBo>)findPage("selectServiceOrderByPage","selectServiceOrderCount", 
-				params, pageNo, pageSize);
-	}
+
+	
 
 	@Override
 	public int createServiceOrder(String uid, Integer orderType,String contractType) {

+ 0 - 34
src/main/java/com/goafanti/star/bo/BigShotStarInterest.java

@@ -1,34 +0,0 @@
-package com.goafanti.star.bo;
-
-public class BigShotStarInterest {
-	private String	interestId;
-
-	private String	fromUid;
-
-	private String	toUid;
-
-	public String getInterestId() {
-		return interestId;
-	}
-
-	public void setInterestId(String interestId) {
-		this.interestId = interestId;
-	}
-
-	public String getFromUid() {
-		return fromUid;
-	}
-
-	public void setFromUid(String fromUid) {
-		this.fromUid = fromUid;
-	}
-
-	public String getToUid() {
-		return toUid;
-	}
-
-	public void setToUid(String toUid) {
-		this.toUid = toUid;
-	}
-
-}

+ 0 - 36
src/main/java/com/goafanti/star/bo/BigShotStarListBo.java

@@ -1,36 +0,0 @@
-package com.goafanti.star.bo;
-
-import com.goafanti.user.bo.StarListBo;
-
-public class BigShotStarListBo extends StarListBo {
-	private Integer	fansNum;
-
-	private String	personPortraitUrl;
-
-	private String	interestId;
-
-	public Integer getFansNum() {
-		return fansNum;
-	}
-
-	public void setFansNum(Integer fansNum) {
-		this.fansNum = fansNum;
-	}
-
-	public String getPersonPortraitUrl() {
-		return personPortraitUrl;
-	}
-
-	public void setPersonPortraitUrl(String personPortraitUrl) {
-		this.personPortraitUrl = personPortraitUrl;
-	}
-
-	public String getInterestId() {
-		return interestId;
-	}
-
-	public void setInterestId(String interestId) {
-		this.interestId = interestId;
-	}
-
-}

+ 0 - 36
src/main/java/com/goafanti/star/bo/HotStarListBo.java

@@ -1,36 +0,0 @@
-package com.goafanti.star.bo;
-
-import com.goafanti.user.bo.StarListBo;
-
-public class HotStarListBo extends StarListBo {
-	private Integer	fansNum;
-
-	private String	personPortraitUrl;
-
-	private String	interestId;
-
-	public Integer getFansNum() {
-		return fansNum;
-	}
-
-	public void setFansNum(Integer fansNum) {
-		this.fansNum = fansNum;
-	}
-
-	public String getPersonPortraitUrl() {
-		return personPortraitUrl;
-	}
-
-	public void setPersonPortraitUrl(String personPortraitUrl) {
-		this.personPortraitUrl = personPortraitUrl;
-	}
-
-	public String getInterestId() {
-		return interestId;
-	}
-
-	public void setInterestId(String interestId) {
-		this.interestId = interestId;
-	}
-
-}

+ 0 - 145
src/main/java/com/goafanti/star/controller/AdminStarApiController.java

@@ -1,145 +0,0 @@
-package com.goafanti.star.controller;
-
-import java.util.List;
-
-import javax.annotation.Resource;
-
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.alibaba.fastjson.JSON;
-import com.goafanti.common.bo.Result;
-import com.goafanti.common.constant.AFTConstants;
-import com.goafanti.common.constant.ErrorConstants;
-import com.goafanti.common.controller.BaseApiController;
-import com.goafanti.common.enums.StarCacheKey;
-import com.goafanti.common.enums.StarType;
-import com.goafanti.common.model.Star;
-import com.goafanti.common.utils.StringUtils;
-import com.goafanti.star.service.StarService;
-import com.goafanti.user.service.UserService;
-
-/**
- * 科技明星
- */
-@RestController
-@RequestMapping(value = "/api/admin/star")
-public class AdminStarApiController extends BaseApiController {
-	@Resource
-	private UserService				userService;
-	@Resource
-	private StarService				starService;
-
-	private static final Integer	STAR_MAX_NUM	= 6;
-
-	private static final Integer	HOT_MAX_NUM		= 4;
-
-	/**
-	 * 科技明星列表
-	 */
-	@RequestMapping(value = "/list", method = RequestMethod.GET)
-	public Result starList(Integer number, String engagedField, String username, String professionalTitle,
-			String workUnit, String pageNo, String pageSize) {
-		Result res = new Result();
-		Integer pNo = 1;
-		Integer pSize = 10;
-		if (StringUtils.isNumeric(pageSize)) {
-			pSize = Integer.parseInt(pageSize);
-		}
-
-		if (StringUtils.isNumeric(pageNo)) {
-			pNo = Integer.parseInt(pageNo);
-		}
-		res.setData(userService.listStar(number, engagedField, username, professionalTitle, workUnit, pNo, pSize));
-		return res;
-	}
-
-	/**
-	 * 大咖说首页展示明星列表
-	 */
-	@RequestMapping(value = "/hotList", method = RequestMethod.GET)
-	public Result hotList() {
-		Result res = new Result();
-		res.setData(starService.listHotStar());
-		return res;
-	}
-
-	/**
-	 * 科技明星页面展示列表
-	 */
-	@RequestMapping(value = "/starList", method = RequestMethod.GET)
-	public Result starList() {
-		Result res = new Result();
-		res.setData(starService.listStarList(null));
-		return res;
-	}
-
-	/**
-	 * 保存展示科技明星
-	 */
-	@RequestMapping(value = "/save", method = RequestMethod.POST)
-	public Result save(@RequestParam(name = "data", required = false) String d,
-			@RequestParam(name = "hot[]", required = false) String[] hot) {
-		Result res = new Result();
-		List<Star> data = JSON.parseArray(d, Star.class);
-		if (null == data || data.size() < 1) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "科技明星列表"));
-			return res;
-		}
-
-		if (null == hot || hot.length < 1) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "大咖说科技明星列表"));
-			return res;
-		}
-
-		if (data.size() > STAR_MAX_NUM) {
-			res.getError().add(buildError("", "科技明星数量过多!"));
-			return res;
-		}
-
-		if (hot.length > HOT_MAX_NUM) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "大咖说科技明星数量过多!"));
-			return res;
-		}
-
-		for (Star s : data) {
-			if (StringUtils.isBlank(s.getUid())) {
-				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "科技明星ID"));
-				return res;
-			}
-			if (null == s.getStar()){
-				res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "star"));
-				return res;
-			}
-			
-			if (!StarType.STAR.getCode().equals(s.getStar())){
-				res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "star"));
-				return res;
-			}
-		}
-		starService.save(data, hot);
-		starService.clearBigShotStarList(AFTConstants.BIG_SHOT_STAR_CACHE_KEY);
-		return res;
-	}
-	
-	/**
-	 * 清除缓存
-	 */
-	@RequestMapping(value = "/cleanCache", method = RequestMethod.POST)
-	public Result cleanCache(String cacheKey) {
-		Result res = new Result();
-		if (StringUtils.isBlank(cacheKey)) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "缓存标记"));
-			return res;
-		}
-		if (StarCacheKey.BIG_SHOT_STAR_CACHE_KEY.getCode().equals(cacheKey)) {
-			starService.clearBigShotStarList(AFTConstants.BIG_SHOT_STAR_CACHE_KEY); // 清除大咖说科技明星列表缓存
-		} else {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "缓存标记"));
-		}
-		return res;
-	}
-	
-}

+ 0 - 29
src/main/java/com/goafanti/star/service/StarService.java

@@ -1,29 +0,0 @@
-package com.goafanti.star.service;
-
-import java.util.List;
-
-import com.goafanti.common.model.Star;
-import com.goafanti.star.bo.BigShotStarInterest;
-import com.goafanti.star.bo.BigShotStarListBo;
-import com.goafanti.star.bo.HotStarListBo;
-
-
-public interface StarService {
-
-	List<HotStarListBo> listHotStar();
-
-	List<HotStarListBo> listStarList(String uid);
-
-	void save(List<Star> star, String[] hot);
-
-	public List<BigShotStarListBo> listBigShotStar(Integer bigShotStarCacheKey);
-	
-	public void clearBigShotStarList(Integer bigShotStarCacheKey);
-
-	List<BigShotStarInterest> findBigShotInterestStatus(String uid);
-
-	List<BigShotStarInterest> findStarInterestStatus(String userId);
-	
-	
-
-}

+ 0 - 84
src/main/java/com/goafanti/star/service/impl/StarServiceImpl.java

@@ -1,84 +0,0 @@
-package com.goafanti.star.service.impl;
-
-import java.util.List;
-import java.util.UUID;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.cache.annotation.CacheEvict;
-import org.springframework.cache.annotation.Cacheable;
-import org.springframework.stereotype.Service;
-
-import com.goafanti.common.dao.StarMapper;
-import com.goafanti.common.enums.StarHotType;
-import com.goafanti.common.enums.StarType;
-import com.goafanti.common.model.Star;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.star.bo.BigShotStarInterest;
-import com.goafanti.star.bo.BigShotStarListBo;
-import com.goafanti.star.bo.HotStarListBo;
-import com.goafanti.star.service.StarService;
-
-@Service
-public class StarServiceImpl implements StarService {
-
-	private static final Logger	logger	= LoggerFactory.getLogger(StarServiceImpl.class);
-
-	@Autowired
-	private StarMapper			starMapper;
-
-	@Override
-	public List<HotStarListBo> listHotStar() {
-		return starMapper.listHostStar();
-	}
-
-	@Override
-	public List<HotStarListBo> listStarList(String uid) {
-		return starMapper.listStarList(uid);
-	}
-
-	@Override
-	public void save(List<Star> starList, String[] hot) {
-		starMapper.deleteAll();
-		for (Star s : starList) {
-			s.setId(UUID.randomUUID().toString());
-			s.setHot(StarHotType.UNHOT.getCode());
-		}
-		
-		Star star = null;
-		for (String ss : hot){
-			star = new Star();
-			star.setId(UUID.randomUUID().toString());
-			star.setUid(ss);
-			star.setHot(StarHotType.HOT.getCode());
-			star.setStar(StarType.UNSTAR.getCode());
-			starList.add(star);
-		}
-
-		starMapper.insertBatch(starList);
-	}
-
-	@Override
-	@Cacheable(value = "BigShotStarListCache", key = "'BigShotStarList:'+#bigShotStarCacheKey")
-	public List<BigShotStarListBo> listBigShotStar(Integer bigShotStarCacheKey) {
-		return starMapper.listBigShotStar();
-	}
-
-	@Override
-	@CacheEvict(value = "BigShotStarListCache", key = "'BigShotStarList:'+#bigShotStarCacheKey")
-	public void clearBigShotStarList(Integer bigShotStarCacheKey) {
-		LoggerUtils.debug(logger, "清除大咖说科技明星列表缓存:[%s]", bigShotStarCacheKey);
-	}
-
-	@Override
-	public List<BigShotStarInterest> findBigShotInterestStatus(String uid) {
-		return starMapper.findBigShotInterestStatus(uid);
-	}
-
-	@Override
-	public List<BigShotStarInterest> findStarInterestStatus(String uid) {
-		return starMapper.findStarInterestStatus(uid);
-	}
-
-}