Commit 2eecdddb by “Kongxiangkun”

增加积分商城相关代码

parent 9d8b402b
......@@ -10,4 +10,10 @@ public class PointSearchParamVO {
private Integer pageNo;
private Integer pageSize;
private String learnType;
private Long startTime;
private Long endTime;
}
......@@ -10,6 +10,7 @@ import com.yizhi.application.domain.PointDetails;
import com.yizhi.application.domain.PointUser;
import com.yizhi.application.mapper.PointDetailsMapper;
import com.yizhi.application.mapper.PointMapper;
import com.yizhi.application.mapper.PointProductMapper;
import com.yizhi.application.mapper.PointUserMapper;
import com.yizhi.application.orm.id.IdGenerator;
import com.yizhi.application.repository.PointDetailsRepository;
......@@ -58,6 +59,9 @@ public class PointDetailsServiceImpl extends ServiceImpl<PointDetailsMapper, com
@Autowired
PointDetailsRepository pointDetailsRepository;
@Autowired
PointProductMapper pointProductMapper;
private String updateSql = "";
@Override
public void updateChangeAfter(Long accountId, Long siteId) {
......@@ -234,6 +238,15 @@ public class PointDetailsServiceImpl extends ServiceImpl<PointDetailsMapper, com
List<Long> accountIds, Date startTime, Date endTime, Long companyId, Long siteId) {
Page<PointDetailsVO> page = new Page<PointDetailsVO>(pageNo, pageSize);
List<PointDetailsVO> list = pointDetailsMapper.getManagePointDetails(page, learnType, accountIds, startTime, endTime, companyId, siteId);
for(PointDetailsVO vo : list) {
if("point_exchange".equals(vo.getLearnType())) {
String productNames = pointProductMapper.getProductNamesByProductIds(
Arrays.asList(vo.getLearnSource()));
log.info("积分明细查询商品名称:{}", productNames);
String learnName = vo.getLearnName() + " 兑换商品:" + productNames;
vo.setLearnName(learnName);
}
}
page.setRecords(list);
return page;
}
......
......@@ -227,6 +227,7 @@ public class PointServiceImpl extends ServiceImpl<PointMapper, Point> implements
if("point_exchange".equals(vo.getLearnType())) {
String productNames = pointProductMapper.getProductNamesByProductIds(
Arrays.asList(vo.getLearnSource()));
log.info("积分明细查询商品名称:{}", productNames);
String learnName = vo.getLearnName() + " 兑换商品:" + productNames;
vo.setLearnName(learnName);
}
......
......@@ -77,7 +77,7 @@
<select id="getManagePointDetails" resultType="com.yizhi.point.application.vo.PointDetailsVO">
SELECT account_id,time,learn_type,learn_name,learn_source,point,CASE WHEN point > 0 THEN 1 ELSE 0 END AS
flag,DATE_FORMAT( time, '%m' ) AS month
flag,DATE_FORMAT( time, '%m' ) AS month, change_before,change_after
FROM point_details
WHERE company_id=#{companyId}
<if test="siteId!=null">
......
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