wuxw
2022-07-19 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54
service-store/src/main/java/com/java110/store/api/StoreApi.java
old mode 100644 new mode 100755
@@ -22,12 +22,14 @@
import com.java110.po.store.StorePo;
import com.java110.store.bmo.store.IUpdateStoreStateBMO;
import com.java110.store.smo.IStoreServiceSMO;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.InitConfigDataException;
import com.java110.utils.exception.InitDataFlowContextException;
import com.java110.utils.util.Assert;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
@@ -89,8 +91,9 @@
                    null);
        } finally {
            logger.debug("storeApi 请求报文{},返回报文:{}", orderInfo, responseJson.toJSONString());
            return responseJson.toJSONString();
        }
        return responseJson.toJSONString();
    }
    /**
@@ -135,9 +138,15 @@
     * @param reqJson 请求对象
     * @return
     */
    @RequestMapping(value = "/storeApi/updateStoreState", method = RequestMethod.GET)
    @RequestMapping(value = "/storeApi/updateStoreState", method = RequestMethod.POST)
    public ResponseEntity<String> updateStoreState(@RequestBody JSONObject reqJson) {
        String env = MappingCache.getValue("HC_ENV");
        if (!"PROD".equals(env)) {
            return ResultVo.error("演示环境,不允许操作");
        }
        Assert.hasKeyAndValue(reqJson, "storeId", "未包含商户信息");
        Assert.hasKeyAndValue(reqJson, "state", "未包含商户状态");