商户
This commit is contained in:
parent
6359692ea0
commit
d5c30399e2
@ -51,8 +51,8 @@ public class AppMerchantController extends BaseController {
|
|||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
LambdaQueryWrapper<AppMerchant> lqw = Wrappers.lambdaQuery(appMerchant);
|
LambdaQueryWrapper<AppMerchant> lqw = Wrappers.lambdaQuery(appMerchant);
|
||||||
if (StringUtils.isNotBlank(appMerchant.getName())){
|
if (StringUtils.isNotBlank(appMerchant.getMchName())){
|
||||||
lqw.like(AppMerchant::getName ,appMerchant.getName());
|
lqw.like(AppMerchant::getMchName ,appMerchant.getMchName());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(appMerchant.getSubtitle())){
|
if (StringUtils.isNotBlank(appMerchant.getSubtitle())){
|
||||||
lqw.eq(AppMerchant::getSubtitle ,appMerchant.getSubtitle());
|
lqw.eq(AppMerchant::getSubtitle ,appMerchant.getSubtitle());
|
||||||
@ -60,8 +60,8 @@ public class AppMerchantController extends BaseController {
|
|||||||
if (StringUtils.isNotBlank(appMerchant.getAvatar())){
|
if (StringUtils.isNotBlank(appMerchant.getAvatar())){
|
||||||
lqw.eq(AppMerchant::getAvatar ,appMerchant.getAvatar());
|
lqw.eq(AppMerchant::getAvatar ,appMerchant.getAvatar());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(appMerchant.getDesc())){
|
if (StringUtils.isNotBlank(appMerchant.getMchDesc())){
|
||||||
lqw.eq(AppMerchant::getDesc ,appMerchant.getDesc());
|
lqw.eq(AppMerchant::getMchDesc ,appMerchant.getMchDesc());
|
||||||
}
|
}
|
||||||
List<AppMerchant> list = iAppMerchantService.list(lqw);
|
List<AppMerchant> list = iAppMerchantService.list(lqw);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -96,10 +96,10 @@ public class AppMerchantController extends BaseController {
|
|||||||
@Log(title = "商户" , businessType = BusinessType.INSERT)
|
@Log(title = "商户" , businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody AppMerchant appMerchant) {
|
public AjaxResult add(@RequestBody AppMerchant appMerchant) {
|
||||||
String richText = appMerchant.getDesc();
|
String richText = appMerchant.getMchDesc();
|
||||||
if (richText != null && StringUtils.isNotEmpty(richText)) {
|
if (richText != null && StringUtils.isNotEmpty(richText)) {
|
||||||
Document doc = RichTextUtil.setImgStyle(richText, "width: 100%");
|
Document doc = RichTextUtil.setImgStyle(richText, "width: 100%");
|
||||||
appMerchant.setDesc(doc.body().children().toString());
|
appMerchant.setMchDesc(doc.body().children().toString());
|
||||||
}
|
}
|
||||||
return toAjax(iAppMerchantService.save(appMerchant) ? 1 : 0);
|
return toAjax(iAppMerchantService.save(appMerchant) ? 1 : 0);
|
||||||
}
|
}
|
||||||
@ -111,10 +111,10 @@ public class AppMerchantController extends BaseController {
|
|||||||
@Log(title = "商户" , businessType = BusinessType.UPDATE)
|
@Log(title = "商户" , businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody AppMerchant appMerchant) {
|
public AjaxResult edit(@RequestBody AppMerchant appMerchant) {
|
||||||
String richText = appMerchant.getDesc();
|
String richText = appMerchant.getMchDesc();
|
||||||
if (richText != null && StringUtils.isNotEmpty(richText)) {
|
if (richText != null && StringUtils.isNotEmpty(richText)) {
|
||||||
Document doc = RichTextUtil.setImgStyle(richText, "width: 100%");
|
Document doc = RichTextUtil.setImgStyle(richText, "width: 100%");
|
||||||
appMerchant.setDesc(doc.body().children().toString());
|
appMerchant.setMchDesc(doc.body().children().toString());
|
||||||
}
|
}
|
||||||
return toAjax(iAppMerchantService.updateById(appMerchant) ? 1 : 0);
|
return toAjax(iAppMerchantService.updateById(appMerchant) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ private static final long serialVersionUID=1L;
|
|||||||
|
|
||||||
/** 商户名称 */
|
/** 商户名称 */
|
||||||
@Excel(name = "商户名称")
|
@Excel(name = "商户名称")
|
||||||
private String name;
|
private String mchName;
|
||||||
|
|
||||||
/** 副标题 */
|
/** 副标题 */
|
||||||
@Excel(name = "副标题")
|
@Excel(name = "副标题")
|
||||||
@ -50,7 +50,7 @@ private static final long serialVersionUID=1L;
|
|||||||
|
|
||||||
/** 介绍 */
|
/** 介绍 */
|
||||||
@Excel(name = "介绍")
|
@Excel(name = "介绍")
|
||||||
private String desc;
|
private String mchDesc;
|
||||||
|
|
||||||
/** 创建者 */
|
/** 创建者 */
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
@ -6,11 +6,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<resultMap type="AppMerchant" id="AppMerchantResult">
|
<resultMap type="AppMerchant" id="AppMerchantResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="name" column="name" />
|
<result property="mchName" column="mch_name" />
|
||||||
<result property="subtitle" column="subtitle" />
|
<result property="subtitle" column="subtitle" />
|
||||||
<result property="avatar" column="avatar" />
|
<result property="avatar" column="avatar" />
|
||||||
<result property="desc" column="desc" />
|
<result property="mchDesc" column="mch_desc" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user