Commit 0c58496c by huluobin

普通会员同步

parent 28d9d5bf
......@@ -40,4 +40,8 @@ public interface CustomerBalanceRecordMapper extends BaseMapper<CustomerBalanceR
*/
Page<CustomerBalanceRecord> queryPageAchieve(Page<CustomerBalanceRecord> page, @Param("technicianId") Integer technicianId, @Param("month") String month);
/**
* 定时同步余额为0的用户为普通会员
*/
void syncBalanceLevel();
}
......@@ -625,4 +625,12 @@ public class Schedule {
});
log.info("评价提醒推送定时任务结束");
}
/**
* 每分钟同步余额为0的会员为普通会员
*/
@Scheduled(cron = "0 0/1 * * * *")
public void syncBalanceLevel() {
balanceRecordDao.syncBalanceLevel();
}
}
......@@ -36,6 +36,14 @@
</sql>
<update id="syncBalanceLevel">
update customer_balance
set `level` ='普通会员'
where balance = 0
and `level` != '普通会员'
</update>
<select id="getBalanceRecordCard" resultMap="BaseResultMap"
parameterType="com.gogirl.domain.user.customer.CustomerBalanceRecord">
SELECT t1.*
......
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