| @@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.RestController; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.ArrayList; | |||
| import java.util.Collection; | |||
| import java.util.Collections; | |||
| import java.util.List; | |||
| @RestController | |||
| @@ -50,7 +52,7 @@ public class WxDateAmountRecordController extends BaseController { | |||
| temp.setTenantId(u.getTenantId()); | |||
| temp.setMerchantId(u.getMerchantId()); | |||
| temp.setType(verified); | |||
| temp.setSortColumns(WxDateAmountRecord.Field.UpdateDate_ASC); | |||
| temp.setSortColumns(WxDateAmountRecord.Field.UpdateDate_DESC); | |||
| SimpleDateFormat fmt = new SimpleDateFormat("MM/dd"); | |||
| @@ -65,6 +67,7 @@ public class WxDateAmountRecordController extends BaseController { | |||
| vo.setMouthAndDate(fmt.format(wxDateAmountRecord.getUpdateDate())); | |||
| list.add(vo); | |||
| } | |||
| Collections.reverse(list); | |||
| } | |||
| return new ResultData(list); | |||
| } | |||
| @@ -138,14 +138,14 @@ public class WxDateAmountRecord implements Serializable { | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,Date_ASC("`date` ASC"),Date_DESC("`date` DESC") | |||
| ,DayOfWeek_ASC("`dayOfWeek` ASC"),DayOfWeek_DESC("`dayOfWeek` DESC") | |||
| ,WeekOfYear_ASC("`weekOfYear` ASC"),WeekOfYear_DESC("`weekOfYear` DESC") | |||
| ,PayPrice_ASC("`payPrice` ASC"),PayPrice_DESC("`payPrice` DESC") | |||
| ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") | |||
| ,DayOfWeek_ASC("`day_of_week` ASC"),DayOfWeek_DESC("`day_of_week` DESC") | |||
| ,WeekOfYear_ASC("`week_of_year` ASC"),WeekOfYear_DESC("`week_of_year` DESC") | |||
| ,PayPrice_ASC("`pay_price` ASC"),PayPrice_DESC("`pay_price` DESC") | |||
| ,TenantId_ASC("`tenant_id` ASC"),TenantId_DESC("`tenant_id` DESC") | |||
| ,Month_ASC("`month` ASC"),Month_DESC("`month` DESC") | |||
| ,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC") | |||
| ,CreateDate_ASC("`createDate` ASC"),CreateDate_DESC("`createDate` DESC") | |||
| ,UpdateDate_ASC("`updateDate` ASC"),UpdateDate_DESC("`updateDate` DESC") | |||
| ,MerchantId_ASC("`merchant_id` ASC"),MerchantId_DESC("`merchant_id` DESC") | |||
| ,CreateDate_ASC("`create_date` ASC"),CreateDate_DESC("`create_date` DESC") | |||
| ,UpdateDate_ASC("`update_date` ASC"),UpdateDate_DESC("`update_date` DESC") | |||
| ,Type_ASC("`type` ASC"),Type_DESC("`type` DESC") | |||
| ; | |||
| private String value; | |||
| @@ -179,7 +179,7 @@ public class WxDateAmountRecord implements Serializable { | |||
| sb.append(","); | |||
| sb.append(fields[k].toString()); | |||
| } | |||
| this.sortColumns = sb.toString(); | |||
| } | |||
| public void setSortColumns(String sortColumns) | |||
| @@ -136,7 +136,9 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| return vo; | |||
| } | |||
| //**************************************************自动打标逻辑代码 ************************************************************* | |||
| //打标 | |||
| private List<WxTags> assign(WxCUserBasicInfo user, EnumTag tag){ | |||
| WxCUserTags record = new WxCUserTags(); | |||
| @@ -160,6 +162,7 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| return wxTagsMapper.findList(wxTags); | |||
| } | |||
| //去标 | |||
| private List<WxTags> resign(WxCUserBasicInfo user, EnumTag tag){ | |||
| WxCUserTags record = new WxCUserTags(); | |||
| @@ -186,6 +189,7 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| } | |||
| //类型打标 | |||
| private List<WxTags> assignTypeId1(WxCUserBasicInfo user, Integer sex) { | |||
| List<WxTags> resList = null; | |||
| if (sex.equals(EnumCUserBaseInfoSex.MALE)) | |||
| @@ -221,17 +225,17 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| int year = cal.get(Calendar.YEAR); | |||
| if (year > 1900) { | |||
| EnumTag[] years = new EnumTag[]{EnumTag.ID_8, | |||
| EnumTag.ID_9, | |||
| EnumTag.ID_10, | |||
| EnumTag.ID_11, | |||
| EnumTag.ID_12, | |||
| EnumTag.ID_13, | |||
| EnumTag.ID_14, | |||
| EnumTag.ID_15, | |||
| EnumTag.ID_16, | |||
| EnumTag.ID_17, | |||
| EnumTag.ID_18, | |||
| EnumTag.ID_19 | |||
| EnumTag.ID_9, | |||
| EnumTag.ID_10, | |||
| EnumTag.ID_11, | |||
| EnumTag.ID_12, | |||
| EnumTag.ID_13, | |||
| EnumTag.ID_14, | |||
| EnumTag.ID_15, | |||
| EnumTag.ID_16, | |||
| EnumTag.ID_17, | |||
| EnumTag.ID_18, | |||
| EnumTag.ID_19 | |||
| }; | |||
| return assign(user, years[(year - 1900) % years.length]); | |||
| } | |||
| @@ -240,23 +244,23 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| private List<WxTags> assignTypeId4(WxCUserBasicInfo user, Date date) { | |||
| final int[] dayArr = new int[]{ | |||
| 20, 19, 21, 20, | |||
| 21, 22, 23, 23, | |||
| 23, 24, 23, 22}; | |||
| 20, 19, 21, 20, | |||
| 21, 22, 23, 23, | |||
| 23, 24, 23, 22}; | |||
| final EnumTag[] constellation = new EnumTag[]{ | |||
| EnumTag.ID_29, | |||
| EnumTag.ID_30, | |||
| EnumTag.ID_31, | |||
| EnumTag.ID_20, | |||
| EnumTag.ID_21, | |||
| EnumTag.ID_22, | |||
| EnumTag.ID_23, | |||
| EnumTag.ID_24, | |||
| EnumTag.ID_25, | |||
| EnumTag.ID_26, | |||
| EnumTag.ID_27, | |||
| EnumTag.ID_28, | |||
| EnumTag.ID_29, | |||
| EnumTag.ID_29, | |||
| EnumTag.ID_30, | |||
| EnumTag.ID_31, | |||
| EnumTag.ID_20, | |||
| EnumTag.ID_21, | |||
| EnumTag.ID_22, | |||
| EnumTag.ID_23, | |||
| EnumTag.ID_24, | |||
| EnumTag.ID_25, | |||
| EnumTag.ID_26, | |||
| EnumTag.ID_27, | |||
| EnumTag.ID_28, | |||
| EnumTag.ID_29, | |||
| }; | |||
| Calendar cal = Calendar.getInstance(); | |||
| cal.setTime(date); | |||
| @@ -436,7 +440,7 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| return resList; | |||
| } | |||
| //打标触发 | |||
| //@Override | |||
| private List<WxTags> triggerAssignTags(EnumAssignTagsTrigger trigger, Object obj) { | |||
| if (obj != null) | |||
| @@ -523,7 +527,6 @@ public class WxCUserTagsServiceImpl implements WxCUserTagsService { | |||
| } | |||
| //活跃 | |||
| resList = assignTypeId21(user, param); | |||
| } | |||
| } | |||
| break; | |||