| | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.LtkjApplication; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.hosp.domain.DictHosp; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.junit.Test; |
| | |
| | | import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | import org.springframework.data.redis.core.Cursor; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.core.ScanOptions; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | // |
| | | // @Autowired |
| | | // private ITjGroupingProService groupingProService; |
| | | // @Autowired |
| | | // private ITjProjectService projectService; |
| | | @Autowired |
| | | private ITjProjectService projectService; |
| | | // |
| | | // @Resource |
| | | // private ITjOrderService tjOrderService; |
| | |
| | | // @Resource |
| | | // private ITjOrderRemarkService remarkService; |
| | | // |
| | | // @Resource |
| | | // private RedisCache redisCache; |
| | | @Resource |
| | | private RedisCache redisCache; |
| | | // |
| | | // @Autowired |
| | | // public RedisTemplate<String,String> redisTemplate; |
| | | @Autowired |
| | | public RedisTemplate<Object,Object> redisTemplate; |
| | | // @Resource |
| | | // private StringRedisTemplate stringRedisTemplate; |
| | | @Resource |
| | |
| | | @Test |
| | | public void test() { |
| | | // List<DictHosp> list = dictHospService.list(); |
| | | // DateTime dateTime1 = DateUtil.offsetMonth(new Date(),100); |
| | | // for (DictHosp dictHosp : list) { |
| | | // DateTime dateTime1 = DateUtil.offsetMonth(new Date(),6); |
| | | // String mallMerchantSecretKey = SecurityUtils.getMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getHospAreaName(),dictHosp.getExpirationTime()); |
| | | // String mallMerchantSecretKey = SecurityUtils.getMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getHospAreaName(),dateTime1); |
| | | // dictHosp.setSecretKey(mallMerchantSecretKey); |
| | | // dictHosp.setExpirationTime(DateUtil.offsetDay(new Date(),30)); |
| | | // dictHosp.setExpirationTime(dateTime1); |
| | | // dictHospService.updateById(dictHosp); |
| | | // System.out.println(dateTime1); |
| | | // System.out.println("================================================="); |
| | | // System.out.println(mallMerchantSecretKey); |
| | | // } |
| | | } |
| | | // } |
| | | |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |