wuxw
2021-04-23 e9be8d15ab3ee20685793e16071c56485b32e33a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package com.java110.api.bmo.notice.impl;
 
import com.alibaba.fastjson.JSONObject;
import com.java110.api.bmo.ApiBaseBMO;
import com.java110.api.bmo.notice.INoticeBMO;
import com.java110.core.context.DataFlowContext;
import com.java110.dto.notice.NoticeDto;
import com.java110.po.notice.NoticePo;
import com.java110.utils.constant.BusinessTypeConstant;
import com.java110.utils.util.BeanConvertUtil;
import org.springframework.stereotype.Service;
 
/**
 * @ClassName NoticeBMOImpl
 * @Description TODO
 * @Author wuxw
 * @Date 2020/3/9 23:02
 * @Version 1.0
 * add by wuxw 2020/3/9
 **/
@Service("noticeBMOImpl")
public class NoticeBMOImpl extends ApiBaseBMO implements INoticeBMO {
 
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void deleteNotice(JSONObject paramInJson, DataFlowContext dataFlowContext) {
        JSONObject businessNotice = new JSONObject();
        businessNotice.putAll(paramInJson);
        NoticePo noticePo = BeanConvertUtil.covertBean(paramInJson, NoticePo.class);
        super.delete(dataFlowContext, noticePo, BusinessTypeConstant.BUSINESS_TYPE_DELETE_NOTICE);
    }
 
    /**
     * 添加小区信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void addNotice(JSONObject paramInJson, DataFlowContext dataFlowContext) {
 
        JSONObject businessNotice = new JSONObject();
        businessNotice.putAll(paramInJson);
        businessNotice.put("noticeId", "-1");
        if (!paramInJson.containsKey("state")) {
            businessNotice.put("state", NoticeDto.STATE_FINISH);
        }
        NoticePo noticePo = BeanConvertUtil.covertBean(businessNotice, NoticePo.class);
        super.insert(dataFlowContext, noticePo, BusinessTypeConstant.BUSINESS_TYPE_SAVE_NOTICE);
    }
 
    /**
     * 添加公告信息
     *
     * @param paramInJson     接口调用放传入入参
     * @param dataFlowContext 数据上下文
     * @return 订单服务能够接受的报文
     */
    public void updateNotice(JSONObject paramInJson, DataFlowContext dataFlowContext) {
 
 
        NoticePo noticePo = BeanConvertUtil.covertBean(paramInJson, NoticePo.class);
        super.update(dataFlowContext, noticePo, BusinessTypeConstant.BUSINESS_TYPE_UPDATE_NOTICE);
    }
}