Bladeren bron

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	common/common-entity/src/main/java/com/yihu/jw/entity/health/bank/ActivityDO.java
#	svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/controller/ActivityController.java
#	svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/service/ActivityService.java
wangzhinan 6 jaren geleden
bovenliggende
commit
9cdc921755

+ 12 - 8
svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/service/ActivityService.java

@ -528,15 +528,16 @@ public class ActivityService extends BaseJpaService<ActivityDO,ActivityDao> {
        JSONObject jsonObject = new JSONObject();
        TaskPatientDetailDO taskPatientDetailDO1 = taskPatientDetailDao.selectByActivityIdAndPatientId(activityId,patient);
        //积分排行
        String sql  ="SELECT btpd1.patientId, btpd1.total, btpd1.create_time AS updateTime FROM (SELECT btpd.patient_id AS patientId,btpd.total,btpd.create_time AS create_time FROM ( SELECT sum(btpd.total) AS total, btpd.patient_id,btpd.create_time " +
        String sql  ="SELECT btpd.patient_id AS patientId,btpd.total,btpd.create_time AS updateTime FROM ( SELECT sum(btpd.total) AS total, btpd.patient_id,btpd.create_time " +
                "FROM wlyy_health_bank_task_patient_detail btpd " +
                "WHERE btpd.activity_id = '"+activityId +
                "' GROUP BY  btpd.patient_id " +
                " ) btpd " +
                "ORDER BY " +
                " btpd.total DESC)btpd1 ORDER BY btpd1.create_time LIMIT " + (page-1)*size+","+size;
                " btpd.total DESC,btpd.create_time ASC LIMIT " + (page-1)*size+","+size;
        List<TaskPatientDetailDO> patientDetailDOS = jdbcTemplate.query(sql,new BeanPropertyRowMapper<>(TaskPatientDetailDO.class));
        long count=0L;
        int j =0;
        for (TaskPatientDetailDO taskPatientDetailDO:patientDetailDOS){
            String timeSeparated = DateUtils.getDatePoor(new Date(),taskPatientDetailDO.getUpdateTime());
            String goodsSql = "select * from wlyy_health_bank_exchange_goods where patient_id ='"+taskPatientDetailDO.getPatientId()+"' " +
@ -548,20 +549,22 @@ public class ActivityService extends BaseJpaService<ActivityDO,ActivityDao> {
            }
            taskPatientDetailDO.setExchangeGoodsDO(exchangeGoodsDOS);
            taskPatientDetailDO.setTimeSeparated(timeSeparated);
            if (!taskPatientDetailDO.getPatientId().equals(patient)){
                count+=1;
            j++;
            if (taskPatientDetailDO.getPatientId().equals(patient)){
                count = j;
            }
        }
        //活动劵排行
        String sqlCoupon  ="SELECT btpd1.patientId, btpd1.couponTotal, btpd1.create_time AS updateTime FROM (SELECT btpd.patient_id AS patientId,btpd.couponTotal,btpd.create_time AS create_time  FROM ( SELECT sum(btpd.coupon_total) AS couponTotal, btpd.patient_id,btpd.create_time " +
        String sqlCoupon  ="SELECT btpd.patient_id AS patientId,btpd.couponTotal,btpd.create_time AS updateTime  FROM ( SELECT sum(btpd.coupon_total) AS couponTotal, btpd.patient_id,btpd.create_time " +
                "FROM wlyy_health_bank_task_patient_detail btpd " +
                "WHERE btpd.activity_id = '"+activityId +
                "' GROUP BY  btpd.patient_id " +
                " ) btpd " +
                "ORDER BY " +
                " btpd.couponTotal DESC )btpd1 ORDER BY btpd1.create_time DESC LIMIT " + (page-1)*size+","+size;
                " btpd.couponTotal DESC,btpd.create_time ASC LIMIT " + (page-1)*size+","+size;
        List<TaskPatientDetailDO> patientDetailDOS1 = jdbcTemplate.query(sqlCoupon,new BeanPropertyRowMapper<>(TaskPatientDetailDO.class));
        long count2 = 0l;
        int i=0;
        for (TaskPatientDetailDO taskPatientDetailDO:patientDetailDOS1){
            String timeSeparated = DateUtils.getDatePoor(new Date(),taskPatientDetailDO.getUpdateTime());
            String goodsSql = "select * from wlyy_health_bank_exchange_goods where patient_id ='"+taskPatientDetailDO.getPatientId()+"' " +
@ -571,8 +574,9 @@ public class ActivityService extends BaseJpaService<ActivityDO,ActivityDao> {
                TaskGoodsDO taskGoodsDO = taskGoodsDao.selectById(exchangeGoodsDO.getActivityGoodsId());
                exchangeGoodsDO.setTaskGoodsDO(taskGoodsDO);
            }
            if (taskPatientDetailDO.getPatientId().equals(taskPatientDetailDO.getPatientId())){
                count2+=1;
            i++;
            if (taskPatientDetailDO.getPatientId().equals(patient)){
                count2=i;
            }
            taskPatientDetailDO.setExchangeGoodsDO(exchangeGoodsDOS);
            taskPatientDetailDO.setTimeSeparated(timeSeparated);

+ 3 - 3
svr/svr-wlyy-health-bank/src/main/resources/application.yml

@ -35,7 +35,7 @@ hibernate:
  implicit_naming_strategy: org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl
fast-dfs:
  tracker-server: 172.19.103.54:22122 #服务器地址
  tracker-server: 192.168.131.174:8761 #服务器地址
  connect-timeout: 2 #链接超时时间
  network-timeout: 30
  charset: ISO8859-1 #编码
@ -56,7 +56,7 @@ spring:
    username: root
    password: 123456
  redis:
    host: 172.19.103.88 # Redis server host.
    host: 192.168.131.172 # Redis server host.
    port: 6379 # Redis server port.
    #    password: jkzl_ehr
  data:
@ -89,7 +89,7 @@ spring:
    username: ssgg
    password: ssgg
  redis:
    host: 172.19.103.88 # Redis server host.
    host: 192.168.131.172 # Redis server host.
    port: 6379 # Redis server port.
#    password: jkzl_ehr
  data:

+ 2 - 2
svr/svr-wlyy-health-bank/src/main/resources/bootstrap.yml

@ -12,7 +12,7 @@ spring:
  profiles: jwdev
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.17.110.212:1221}
      uri: ${wlyy.spring.config.uri:http://192.168.131.174:1221}
      label: ${wlyy.spring.config.label:jwdev}
---
@ -20,7 +20,7 @@ spring:
  profiles: jwtest
  cloud:
    config:
      uri: ${wlyy.spring.config.uri:http://172.17.110.212:1221}
      uri: ${wlyy.spring.config.uri:http://192.168.131.174:1221}
      label: ${wlyy.spring.config.label:jwdev}