fanli/src/main/java/com/yeshi/fanli/controller/admin/ConfigAdminController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/dao/config/ConfigDao.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ConfigMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/LostOrderMapper.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/mapping/ConfigMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/mapping/order/LostOrderMapper.xml | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/service/impl/config/ConfigServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
fanli/src/main/java/com/yeshi/fanli/service/inter/config/ConfigService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
fanli/src/main/java/com/yeshi/fanli/controller/admin/ConfigAdminController.java
@@ -1,77 +1,75 @@ package com.yeshi.fanli.controller.admin; import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.annotation.Resource; import net.sf.json.JSONObject; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.yeshi.utils.JsonUtil; import com.yeshi.fanli.entity.common.Config; import com.yeshi.fanli.service.AdminUserService; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.tag.PageEntity; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; import net.sf.json.JSONObject; @Controller @RequestMapping("admin/new/api/v1/config") public class ConfigAdminController { @Resource private ConfigService configService; /** * 查询列表 - 新后台 * * @param callback * @param key 查询词 名称 * @param key * 查询词 名称 * @param pageIndex * @param out */ @RequestMapping(value = "getNewConfigList") public void getNewConfigList(String callback, String key, Integer pageIndex, PrintWriter out){ public void getNewConfigList(String callback, String key, Integer pageIndex, PrintWriter out) { try { if (pageIndex == null || pageIndex < 0){ if (pageIndex == null || pageIndex < 0) { pageIndex = 1; } List<Config> list = configService.listObjects(key, pageIndex); List<Config> list = configService.listObjects(key, pageIndex); if (list == null || list.size() == 0) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无更多数据")); return; } int pageSize = Constant.PAGE_SIZE; int count = configService.getCount(key, pageIndex); int count = configService.getCount(key); int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage); JSONObject data = new JSONObject(); data.put("pe", pe); data.put("result_list", list); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data)); } catch (Exception e) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("查询失败")); e.printStackTrace(); } } /** * 参数修改 - 新后台 * * @param callback * @param config * @param out @@ -84,34 +82,34 @@ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空")); return; } try { Config crentconfig = configService.getConfig(id); if (crentconfig == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作数据已不存在")); return; } if (StringUtil.isNullOrEmpty(config.getName()) || StringUtil.isNullOrEmpty(config.getValue())) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("说明、有效值不能为空")); return; } crentconfig.setName(config.getName()); crentconfig.setValue(config.getValue()); if (!StringUtil.isNullOrEmpty(config.getBeizhu())) { crentconfig.setBeizhu(config.getBeizhu()); } configService.update(crentconfig); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("修改成功")); } catch (Exception e) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("修改失败")); e.printStackTrace(); } } } fanli/src/main/java/com/yeshi/fanli/dao/config/ConfigDao.java
File was deleted fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ConfigMapper.java
@@ -1,20 +1,43 @@ package com.yeshi.fanli.dao.mybatis; import java.util.List; import org.apache.ibatis.annotations.Param; import com.yeshi.fanli.dao.BaseMapper; import com.yeshi.fanli.entity.common.Config; public interface ConfigMapper { public interface ConfigMapper extends BaseMapper<Config> { int deleteByPrimaryKey(Long id); /** * 获取所有配置 * * @return */ List<Config> listAll(); int insert(Config record); /** * 通过名字搜索 * * @param key * @return */ List<Config> listSearchByName(@Param("key") String key, @Param("start") int start, @Param("count") int count); int insertSelective(Config record); /** * 获取通过名字搜索得到的数量 * * @param key * @return */ long countSearchByName(@Param("key") String key); Config selectByPrimaryKey(Long id); Config selectByKey(String key); /** * 根据关键词获取 * * @param key * @return */ List<Config> listByKey(String key); int updateByPrimaryKeySelective(Config record); int updateByPrimaryKey(Config record); } fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/LostOrderMapper.java
@@ -8,6 +8,8 @@ import com.yeshi.fanli.entity.bus.user.LostOrder; public interface LostOrderMapper { LostOrder selectByPrimaryKey(Long id); int updateByPrimaryKeySelective(LostOrder record); fanli/src/main/java/com/yeshi/fanli/mapping/ConfigMapper.xml
@@ -27,6 +27,38 @@ </select> <select id="listAll" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from yeshi_ec_config </select> <select id="listSearchByName" resultMap="BaseResultMap" parameterType="java.lang.String"> select <include refid="Base_Column_List" /> from yeshi_ec_config where `name` like '%${key}%' limit #{start},#{count} </select> <select id="countSearchByName" resultType="java.lang.Long" parameterType="java.lang.String"> select count(*) from yeshi_ec_config where `name` like '%${key}%' </select> <select id="listByKey" resultMap="BaseResultMap" parameterType="java.lang.String"> select <include refid="Base_Column_List" /> from yeshi_ec_config where `key`=#{0} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_config where id = #{id,jdbcType=BIGINT} @@ -60,7 +92,8 @@ <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.common.Config">update yeshi_ec_config set `key` = #{key,jdbcType=VARCHAR},`value` = #{value,jdbcType=VARCHAR},`name` = #{name,jdbcType=VARCHAR},beizhu = #{beizhu,jdbcType=VARCHAR},createtime = #{createtime,jdbcType=VARCHAR} #{beizhu,jdbcType=VARCHAR},createtime = #{createtime,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} </update> <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.common.Config"> fanli/src/main/java/com/yeshi/fanli/mapping/order/LostOrderMapper.xml
@@ -22,7 +22,7 @@ <id column="oid" property="id" jdbcType="BIGINT" /> </association> </resultMap> <resultMap id="AllResultMap" type="com.yeshi.fanli.entity.bus.user.LostOrder"> <id column="id" property="id" jdbcType="BIGINT" /> <result column="orderId" property="orderId" jdbcType="VARCHAR" /> @@ -34,17 +34,23 @@ <result column="judge" property="judge" jdbcType="VARCHAR" /> <result column="result_code" property="resultCode" jdbcType="INTEGER" /> <association property="userInfo" column="uid" select="com.yeshi.fanli.dao.mybatis.UserInfoMapper.selectByPKey"/> <association property="order" column="oid" select="com.yeshi.fanli.dao.mybatis.order.OrderMapper.selectByPrimaryKey"> </association> select="com.yeshi.fanli.dao.mybatis.UserInfoMapper.selectByPKey" /> <association property="order" column="oid" select="com.yeshi.fanli.dao.mybatis.order.OrderMapper.selectByPrimaryKey"> </association> </resultMap> <select id="selectByOrderId" resultMap="BaseResultMap" parameterType="java.lang.String"> select * from yeshi_ec_lost_order where orderId=#{0} </select> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long"> select * from yeshi_ec_lost_order where id=#{0} </select> <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.LostOrder"> update yeshi_ec_lost_order @@ -62,132 +68,142 @@ </set> where id = #{id,jdbcType=BIGINT} </update> <select id="countByUid" resultType="java.util.HashMap"> SELECT IFNULL(COUNT(id), 0) AS total,IFNULL(SUM(CASE WHEN state = 1 THEN 1 ELSE 0 END),0) AS totalPass, IFNULL(SUM(CASE WHEN state = 2 THEN 1 ELSE 0 END),0) AS totalReject FROM yeshi_ec_lost_order WHERE uid = #{uid}; SELECT IFNULL(COUNT(id), 0) AS total,IFNULL(SUM(CASE WHEN state = 1 THEN 1 ELSE 0 END),0) AS totalPass, IFNULL(SUM(CASE WHEN state = 2 THEN 1 ELSE 0 END),0) AS totalReject FROM yeshi_ec_lost_order WHERE uid = #{uid}; </select> <select id="listQuery" resultMap="AllResultMap"> SELECT d.* FROM yeshi_ec_lost_order d left join yeshi_ec_user u on d.uid = u.id WHERE 1=1 <if test='key != null and key != ""'> AND (d.orderId like '%${key}%' or d.uid like '%${key}%' or u.nick_name like '%${key}%') </if> <if test='state != null'> AND d.state = #{state} </if> <if test='handleType != null and handleType == 0'> AND d.state = 0 </if> <if test='handleType != null and handleType != 0'> AND (d.state = 1 or d.state = 2) </if> ORDER BY d.createTime desc LIMIT ${start},${count} </select> <select id="countQuery" resultType="java.lang.Long"> SELECT IFNULL(count(d.id),0) FROM yeshi_ec_lost_order d left join yeshi_ec_user u on d.uid = u.id WHERE 1=1 <if test='key != null and key != ""'> AND (d.orderId like '%${key}%' or d.uid like '%${key}%' or u.nick_name like '%${key}%') </if> <if test='state != null'> AND d.state = #{state} </if> <if test='handleType != null and handleType == 0'> AND d.state = 0 </if> <if test='handleType != null and handleType != 0'> AND (d.state = 1 or d.state = 2) </if> <select id="listQuery" resultMap="AllResultMap"> SELECT d.* FROM yeshi_ec_lost_order d left join yeshi_ec_user u on d.uid = u.id WHERE 1=1 <if test='key != null and key != ""'> AND (d.orderId like '%${key}%' or d.uid like '%${key}%' or u.nick_name like '%${key}%') </if> <if test='state != null'> AND d.state = #{state} </if> <if test='handleType != null and handleType == 0'> AND d.state = 0 </if> <if test='handleType != null and handleType != 0'> AND (d.state = 1 or d.state = 2) </if> ORDER BY d.createTime desc LIMIT ${start},${count} </select> <select id="countLostNum" resultType="java.util.HashMap"> SELECT COUNT(t.`id`) AS showValue, <if test="dateType == 1"> FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS 'showDate' </if> <if test="dateType == 2"> FROM_UNIXTIME(t.`createTime`/1000,'%m') AS 'showDate' </if> <if test="dateType == 3"> FROM_UNIXTIME(t.`createTime`/1000,'%Y') AS 'showDate' </if> FROM `yeshi_ec_lost_order` t WHERE t.`createTime`IS NOT NULL <if test="startTime != null and startTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}' </if> <if test="endTime != null and endTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]> '${endTime}' </if> <if test="year != null and year != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y') = '${year}' </if> <if test="resultCode != null and resultCode != 0 "> AND t.`result_code` = ${resultCode} </if> <select id="countQuery" resultType="java.lang.Long"> SELECT IFNULL(count(d.id),0) FROM yeshi_ec_lost_order d left join yeshi_ec_user u on d.uid = u.id WHERE 1=1 <if test='key != null and key != ""'> AND (d.orderId like '%${key}%' or d.uid like '%${key}%' or u.nick_name like '%${key}%') </if> <if test='state != null'> AND d.state = #{state} </if> <if test='handleType != null and handleType == 0'> AND d.state = 0 </if> <if test='handleType != null and handleType != 0'> AND (d.state = 1 or d.state = 2) </if> </select> <select id="countLostNum" resultType="java.util.HashMap"> SELECT COUNT(t.`id`) AS showValue, <if test="dateType == 1"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS 'showDate' </if> <if test="dateType == 2"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m') FROM_UNIXTIME(t.`createTime`/1000,'%m') AS 'showDate' </if> <if test="dateType == 3"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y') </if> FROM_UNIXTIME(t.`createTime`/1000,'%Y') AS 'showDate' </if> FROM `yeshi_ec_lost_order` t WHERE t.`createTime`IS NOT NULL <if test="startTime != null and startTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}' </if> <if test="endTime != null and endTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]> '${endTime}' </if> <if test="year != null and year != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y') = '${year}' </if> <if test="resultCode != null and resultCode != 0 "> AND t.`result_code` = ${resultCode} </if> <if test="dateType == 1"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') </if> <if test="dateType == 2"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m') </if> <if test="dateType == 3"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y') </if> ORDER BY t.`createTime` </select> <select id="countAppealMoney" resultType="java.util.HashMap"> SELECT CAST(SUM(v.`hb_money`)AS DECIMAL(19,2)) AS showValue, <if test="dateType == 1"> FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS 'showDate' </if> <if test="dateType == 2"> FROM_UNIXTIME(t.`createTime`/1000,'%m') AS 'showDate' </if> <if test="dateType == 3"> FROM_UNIXTIME(t.`createTime`/1000,'%Y') AS 'showDate' </if> FROM `yeshi_ec_lost_order` t LEFT JOIN `yeshi_ec_common_order` tc ON tc.`co_order_no` = t.`orderId` LEFT JOIN `yeshi_ec_hongbao_order` h ON h.`ho_order_id` = tc.`co_id` LEFT JOIN `yeshi_ec_hongbao_v2`v ON h.`ho_hongbao_id` = v.`hb_id` WHERE t.`createTime`IS NOT NULL AND t.`result_code` = 2 AND (v.`hb_type` =1 OR v.`hb_type` = 2) <if test="startTime != null and startTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}' </if> <if test="endTime != null and endTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]> '${endTime}' </if> <if test="year != null and year != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y') = '${year}' </if> <if test="dateType == 1"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') AS 'showDate' </if> <if test="dateType == 2"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m') FROM_UNIXTIME(t.`createTime`/1000,'%m') AS 'showDate' </if> <if test="dateType == 3"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y') </if> FROM_UNIXTIME(t.`createTime`/1000,'%Y') AS 'showDate' </if> FROM `yeshi_ec_lost_order` t LEFT JOIN `yeshi_ec_common_order` tc ON tc.`co_order_no` = t.`orderId` LEFT JOIN `yeshi_ec_hongbao_order` h ON h.`ho_order_id` = tc.`co_id` LEFT JOIN `yeshi_ec_hongbao_v2`v ON h.`ho_hongbao_id` = v.`hb_id` WHERE t.`createTime`IS NOT NULL AND t.`result_code` = 2 AND (v.`hb_type` =1 OR v.`hb_type` = 2) <if test="startTime != null and startTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d')<![CDATA[ >= ]]>'${startTime}' </if> <if test="endTime != null and endTime != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') <![CDATA[ <= ]]> '${endTime}' </if> <if test="year != null and year != '' "> AND FROM_UNIXTIME(t.`createTime`/1000,'%Y') = '${year}' </if> <if test="dateType == 1"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m-%d') </if> <if test="dateType == 2"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y-%m') </if> <if test="dateType == 3"> GROUP BY FROM_UNIXTIME(t.`createTime`/1000,'%Y') </if> ORDER BY t.`createTime` </select> </mapper> fanli/src/main/java/com/yeshi/fanli/service/impl/config/ConfigServiceImpl.java
@@ -1,12 +1,9 @@ package com.yeshi.fanli.service.impl.config; import java.io.Serializable; import java.util.Date; import java.util.List; import javax.annotation.Resource; import net.sf.json.JSONArray; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; @@ -15,7 +12,7 @@ import org.yeshi.utils.entity.ProxyIP; import com.google.gson.Gson; import com.yeshi.fanli.dao.config.ConfigDao; import com.yeshi.fanli.dao.mybatis.ConfigMapper; import com.yeshi.fanli.entity.common.Config; import com.yeshi.fanli.entity.config.AppHomeFloatImg; import com.yeshi.fanli.entity.xcx.XCXSettingConfig; @@ -23,52 +20,28 @@ import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; import net.sf.json.JSONArray; @Service public class ConfigServiceImpl implements ConfigService { @Resource private ConfigDao configDao; private ConfigMapper configMapper; @Cacheable(value = "config") public List<Config> getAllList() { return configDao.list("from Config"); return configMapper.listAll(); } @Override public List<Config> listObjects(String key, int page) { int start = (page - 1) * Constant.PAGE_SIZE; StringBuffer hqlBuf = new StringBuffer("from Config pr where 1=1 "); if (key != null && !"".equals(key.trim())) { hqlBuf.append(" and (pr.name like ? )"); } hqlBuf.append(" order by pr.id desc "); String hql = hqlBuf.toString(); if (hql.contains("pr.name")) { return configDao.list(hqlBuf.toString(), start, Constant.PAGE_SIZE, new Serializable[] { "%" + key + "%" }); } else { return configDao.list(hqlBuf.toString(), start, Constant.PAGE_SIZE, new Serializable[] {}); } return configMapper.listSearchByName(key, start, Constant.PAGE_SIZE); } @Override public int getCount(String key, int page) { StringBuffer hqlBuf = new StringBuffer("select count(*) from Config pr where 1=1 "); if (key != null && !"".equals(key.trim())) { hqlBuf.append(" and (pr.name like ? )"); } String hql = hqlBuf.toString(); if (hql.contains("pr.name")) { return (int) configDao.getCount(hqlBuf.toString(), new Serializable[] { "%" + key + "%" }); } else { return (int) configDao.getCount(hqlBuf.toString(), new Serializable[] {}); } public int getCount(String key) { return (int) configMapper.countSearchByName(key); } @CacheEvict(value = "config", allEntries = true) @@ -76,19 +49,19 @@ public void update(List<Config> list) { for (Config config : list) { config.setCreatetime(new Date().getTime() + ""); configDao.update(config); configMapper.updateByPrimaryKeySelective(config); } } @CacheEvict(value = "config", allEntries = true) public void update(Config config) { config.setCreatetime(new Date().getTime() + ""); configDao.update(config); configMapper.updateByPrimaryKeySelective(config); } @Cacheable(value = "config", key = "#p0+'Str'") public String get(String key) { List<Config> list = configDao.list("from Config c where c.key=? ", new Serializable[] { key }); List<Config> list = configMapper.listByKey(key); if (list.size() == 0) { return null; } @@ -98,7 +71,7 @@ @Cacheable(value = "config", key = "#p0") public Config getConfig(String key) { List<Config> list = configDao.list("from Config c where c.key=? ", new Serializable[] { key }); List<Config> list = configMapper.listByKey(key); if (list.size() == 0) { return null; } @@ -191,7 +164,7 @@ @Override public Config getConfig(long id) { return configDao.find(Config.class, id); return configMapper.selectByPrimaryKey(id); } @Override fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java
@@ -17,7 +17,6 @@ import com.yeshi.fanli.entity.bus.user.HongBaoV2; import com.yeshi.fanli.entity.bus.user.LostOrder; import com.yeshi.fanli.entity.bus.user.Order; import com.yeshi.fanli.service.inter.order.CommonOrderService; import com.yeshi.fanli.service.inter.order.HongBaoOrderService; import com.yeshi.fanli.service.inter.order.LostOrderService; import com.yeshi.fanli.service.inter.order.OrderService; @@ -39,6 +38,7 @@ @Resource private LostOrderMapper lostOrderMapper; @Transactional @Override public int addLostOrder(LostOrder lostOrder) { String orderId = lostOrder.getOrderId(); @@ -142,13 +142,13 @@ } lostOrder.setHandleTime(System.currentTimeMillis()); lostOrder.setResultCode(LostOrder.RESULT_CODE_VERFING); lostOrderDao.update(lostOrder); lostOrderMapper.updateByPrimaryKeySelective(lostOrder); } public void reject(LostOrder lostOrder) { lostOrder.setHandleTime(System.currentTimeMillis()); lostOrder.setState(2); lostOrderDao.update(lostOrder); lostOrderMapper.updateByPrimaryKeySelective(lostOrder); } @Override @@ -196,7 +196,7 @@ @Override public LostOrder getOne(long id) { return lostOrderDao.find(LostOrder.class, id); return lostOrderMapper.selectByPrimaryKey(id); } @Override @@ -232,8 +232,14 @@ @Override public void processFail(String orderId) { lostOrderDao.update("update LostOrder lo set lo.resultCode=? where lo.orderId=?", new Serializable[] { LostOrder.RESULT_CODE_FAIL, orderId }); List<LostOrder> list = lostOrderMapper.selectByOrderId(orderId); if (list != null) for (LostOrder order : list) { LostOrder update = new LostOrder(); update.setId(order.getId()); update.setResultCode(LostOrder.RESULT_CODE_FAIL); lostOrderMapper.updateByPrimaryKeySelective(update); } } @Override @@ -247,6 +253,7 @@ @Override public void deleteLostOrder(long id) { LostOrder lostOrder = new LostOrder(); lostOrder.setId(id); lostOrderDao.delete(lostOrder); fanli/src/main/java/com/yeshi/fanli/service/inter/config/ConfigService.java
@@ -92,7 +92,7 @@ * @param page * @return */ public int getCount(String key, int page); public int getCount(String key); public Config getConfig(long id);