commit
50a9453101
@ -790,7 +790,7 @@ public class WechatAppletController extends BaseController {
|
|||||||
public TableDataInfo getCommunityPunch() {
|
public TableDataInfo getCommunityPunch() {
|
||||||
startPage();
|
startPage();
|
||||||
List<CommunityPunchReponse> list = sysWxUserLogService.getCommunityPunch(new SysWxUserLog());
|
List<CommunityPunchReponse> list = sysWxUserLogService.getCommunityPunch(new SysWxUserLog());
|
||||||
if(list != null && list.size() > 0){
|
if (list != null && list.size() > 0) {
|
||||||
for (CommunityPunchReponse comm : list) {
|
for (CommunityPunchReponse comm : list) {
|
||||||
comm.setId(AesUtils.encrypt(comm.getId()));
|
comm.setId(AesUtils.encrypt(comm.getId()));
|
||||||
comm.setCusId(AesUtils.encrypt(comm.getCusId()));
|
comm.setCusId(AesUtils.encrypt(comm.getCusId()));
|
||||||
@ -806,20 +806,14 @@ public class WechatAppletController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/updateHealthManifesto")
|
@PostMapping("/updateHealthManifesto")
|
||||||
public AjaxResult updateHealthManifesto(@RequestParam("cusId") String cusId, @RequestParam("healthManifesto") String healthManifesto) {
|
public AjaxResult updateHealthManifesto(@RequestBody SysWxUserInfo sysWxUserInfo) {
|
||||||
if (StringUtils.isEmpty(healthManifesto, cusId)) {
|
if (StringUtils.isNull(sysWxUserInfo.getOpenid())) {
|
||||||
return AjaxResult.error("缺少必要参数");
|
|
||||||
}
|
|
||||||
cusId = AesUtils.decrypt(cusId);
|
|
||||||
if (cusId == null) {
|
|
||||||
return AjaxResult.error("参数不合法");
|
return AjaxResult.error("参数不合法");
|
||||||
}
|
}
|
||||||
if (healthManifesto.length() > 200) {
|
if (sysWxUserInfo.getHealthManifesto().length() > 200) {
|
||||||
return AjaxResult.error("健康宣言字数过长");
|
return AjaxResult.error("健康宣言字数过长");
|
||||||
}
|
}
|
||||||
SysWxUserInfo sysWxUserInfo = new SysWxUserInfo();
|
|
||||||
sysWxUserInfo.setCusId(Long.parseLong(cusId));
|
|
||||||
sysWxUserInfo.setHealthManifesto(healthManifesto);
|
|
||||||
return toAjax(sysWxUserInfoService.updateHealthManifestoByCusId(sysWxUserInfo));
|
return toAjax(sysWxUserInfoService.updateHealthManifestoByCusId(sysWxUserInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -869,6 +863,9 @@ public class WechatAppletController extends BaseController {
|
|||||||
//获取可以显示的Banner
|
//获取可以显示的Banner
|
||||||
sysWxBannerImage.setShowFlag(1L);
|
sysWxBannerImage.setShowFlag(1L);
|
||||||
List<BannerResponse> list = sysWxBannerImageService.getBannerListOrderByOrderNum(sysWxBannerImage);
|
List<BannerResponse> list = sysWxBannerImageService.getBannerListOrderByOrderNum(sysWxBannerImage);
|
||||||
|
for (BannerResponse banner : list) {
|
||||||
|
banner.setBannerUrl(AliyunOSSUtils.generatePresignedUrl(banner.getBannerUrl()));
|
||||||
|
}
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,26 +3,30 @@ package com.stdiet.custom.dto.response;
|
|||||||
import com.stdiet.common.annotation.Excel;
|
import com.stdiet.common.annotation.Excel;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class BannerResponse implements Serializable {
|
public class BannerResponse {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
/**
|
||||||
|
* banner图标题
|
||||||
/** banner图标题 */
|
*/
|
||||||
@Excel(name = "banner图标题")
|
@Excel(name = "banner图标题")
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
/** banner图内容 */
|
/**
|
||||||
|
* banner图内容
|
||||||
|
*/
|
||||||
@Excel(name = "banner图内容")
|
@Excel(name = "banner图内容")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
/** banner图片地址 */
|
/**
|
||||||
|
* banner图片地址
|
||||||
|
*/
|
||||||
@Excel(name = "banner图片地址")
|
@Excel(name = "banner图片地址")
|
||||||
private String bannerUrl;
|
private String bannerUrl;
|
||||||
|
|
||||||
/** 点击跳转地址 */
|
/**
|
||||||
|
* 点击跳转地址
|
||||||
|
*/
|
||||||
@Excel(name = "点击跳转地址")
|
@Excel(name = "点击跳转地址")
|
||||||
private String jumpUrl;
|
private String jumpUrl;
|
||||||
}
|
}
|
||||||
|
@ -144,9 +144,9 @@
|
|||||||
update sys_wx_user_info set cus_id = null where openid = #{openid}
|
update sys_wx_user_info set cus_id = null where openid = #{openid}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<!-- 根据客户ID更新健康减脂宣言 -->
|
<!-- 根据openID更新健康减脂宣言 -->
|
||||||
<update id="updateHealthManifestoByCusId" parameterType="SysWxUserInfo">
|
<update id="updateHealthManifestoByCusId" parameterType="SysWxUserInfo">
|
||||||
update sys_wx_user_info set health_manifesto = #{healthManifesto} where cus_id = #{cusId}
|
update sys_wx_user_info set health_manifesto = #{healthManifesto} where openid = #{openid}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user