Merge remote-tracking branch 'origin/master'
| | |
| | | import org.springframework.stereotype.Repository;
|
| | |
|
| | | import com.yeshi.fanli.entity.dynamic.DynamicInfo;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | |
|
| | | @Repository
|
| | | public class DynamicInfoDao {
|
| | |
| | | for (DynamicInfo info: list) {
|
| | | mongoTemplate.remove(info);
|
| | | }
|
| | | |
| | | LogHelper.test("已执行完成动态删除");
|
| | | }
|
| | |
|
| | |
|
| | |
| | | /**
|
| | | * 每天零点删除3天之前数据
|
| | | */
|
| | | @Scheduled(cron = "0 0 0 * * ?")
|
| | | @Scheduled(cron = "0 0 0,10 * * ?")
|
| | | public void remove() {
|
| | |
|
| | | if (!Constant.IS_TASK) {
|
| | |
| | | }
|
| | |
|
| | | try {
|
| | | LogHelper.test("开始执行态删除");
|
| | | dynamicInfoService.removeByDate(DateUtil.reduceDay(3, new Date()));
|
| | | } catch (Exception e) {
|
| | | try {
|
| | |
| | | /**
|
| | | * 更新报告
|
| | | */
|
| | | @Scheduled(cron = "0 0 0 * * ?")
|
| | | @Scheduled(cron = "0 0 0,10 * * ?")
|
| | | public void insetDynamicInfo() {
|
| | |
|
| | | if (!Constant.IS_TASK) {
|
| | |
| | | LEFT JOIN `yeshi_ec_share_goods_record` r ON g.`gu_record_id` = r.`sgr_id` |
| | | WHERE r.sgr_share_state = 1 AND r.`sgr_source` = #{source} |
| | | AND g.`gu_common_goods_id` = #{cid} AND r.`sgr_uid` = #{uid} |
| | | ORDER BY g.gu_updatetime desc LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="getNewestRecord" resultMap="BaseResultMap"> |