forked from rongchao/epmet-cloud-rizhao
12 changed files with 232 additions and 1 deletions
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 获取客户小程序模板列表-接口入参 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class TemplateListFormDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 客户Id |
||||
|
*/ |
||||
|
@NotBlank(message="客户Id不能为空", groups = {TemplateListFormDTO.AddUserInternalGroup.class}) |
||||
|
private String customerId; |
||||
|
/** |
||||
|
* 小程序Id |
||||
|
*/ |
||||
|
@NotBlank(message="小程序appId不能为空", groups = {TemplateListFormDTO.AddUserInternalGroup.class}) |
||||
|
private String appId; |
||||
|
/** |
||||
|
* 模板类型(站内信提醒) |
||||
|
*/ |
||||
|
private String templateType; |
||||
|
public interface AddUserInternalGroup {} |
||||
|
} |
||||
|
|
@ -0,0 +1,31 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 获取客户小程序模板列表-接口入参 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GetTemplateListFormDTO implements Serializable { |
||||
|
|
||||
|
/** |
||||
|
* 客户Id |
||||
|
*/ |
||||
|
@NotBlank(message="客户Id不能为空", groups = {AddUserInternalGroup.class}) |
||||
|
private String customerId; |
||||
|
/** |
||||
|
* 小程序Id |
||||
|
*/ |
||||
|
@NotBlank(message="小程序appId不能为空", groups = {AddUserInternalGroup.class}) |
||||
|
private String appId; |
||||
|
/** |
||||
|
* 模板类型(站内信提醒) |
||||
|
*/ |
||||
|
private String templateType; |
||||
|
public interface AddUserInternalGroup {} |
||||
|
} |
||||
|
|
@ -0,0 +1,25 @@ |
|||||
|
package com.epmet.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description 获取客户小程序模板列表-接口返参 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GetTemplateListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 6856602932571839314L; |
||||
|
|
||||
|
/** |
||||
|
* 模板Id |
||||
|
*/ |
||||
|
private String templateId; |
||||
|
|
||||
|
/** |
||||
|
* 模板类型(站内信提醒) |
||||
|
*/ |
||||
|
private String templateType; |
||||
|
|
||||
|
} |
@ -0,0 +1,37 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.form.GetTemplateListFormDTO; |
||||
|
import com.epmet.dto.result.GetTemplateListResultDTO; |
||||
|
import com.epmet.service.PersonalTemplateService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2020-09-09 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("personaltemplate") |
||||
|
public class PersonalTemplateController { |
||||
|
|
||||
|
@Autowired |
||||
|
private PersonalTemplateService personalTemplateService; |
||||
|
|
||||
|
/** |
||||
|
* @return |
||||
|
* @Description 居民端、工作端-获取客户小程序模板列表 |
||||
|
* @author sun |
||||
|
*/ |
||||
|
@PostMapping("templatelist") |
||||
|
public Result<List<GetTemplateListResultDTO>> templateList(@RequestBody GetTemplateListFormDTO formDTO) { |
||||
|
return new Result<List<GetTemplateListResultDTO>>().ok(personalTemplateService.templateList(formDTO)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue