Commit 62c37e85 authored by zhang_z's avatar zhang_z

修改利润计算方法;

添加Accept-Language;
更新版本;
parent ea5d4956
<component name="ProjectDictionaryState">
<dictionary name="Eurus">
<words>
<w>addr</w>
<w>alipay</w>
<w>amountexceed</w>
<w>appid</w>
<w>baifubao</w>
<w>baozheng</w>
<w>bestpay</w>
<w>caocao</w>
<w>chengyaojin</w>
<w>diaochan</w>
<w>exps</w>
<w>guanyu</w>
<w>hshop</w>
<w>huanggai</w>
<w>huangxin</w>
<w>inputer</w>
<w>instrans</w>
<w>invalidmerno</w>
<w>invalidstore</w>
<w>jdpay</w>
<w>jsonpay</w>
<w>jspay</w>
<w>kongming</w>
<w>kongrong</w>
<w>kongrun</w>
<w>likui</w>
<w>liubei</w>
<w>lvzhi</w>
<w>mawu</w>
<w>mernoblocked</w>
<w>micropay</w>
<w>nong</w>
<w>noti</w>
<w>parametererror</w>
<w>patt</w>
<w>paxpay</w>
<w>posppp</w>
<w>qqpay</w>
<w>qrpay</w>
<w>shixiu</w>
<w>shopppp</w>
<w>signerror</w>
<w>skugrps</w>
<w>skus</w>
<w>strs</w>
<w>sunquan</w>
<w>transclose</w>
<w>ucodepay</w>
<w>unionpay</w>
<w>unipay</w>
<w>unkonw</w>
<w>unkonwcode</w>
<w>usingpay</w>
<w>xishi</w>
<w>yanqing</w>
<w>yuefei</w>
<w>yuji</w>
<w>yyyymmddhhmmss</w>
<w>zhangfei</w>
<w>zhouyu</w>
<w>zzdpos</w>
</words>
</dictionary>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="ClassWithMultipleLoggers" enabled="true" level="WARNING" enabled_by_default="true">
<option name="loggerNamesString" value="java.util.logging.Logger,org.slf4j.Logger,org.apache.commons.logging.Log,org.apache.log4j.Logger" />
</inspection_tool>
<inspection_tool class="LogStatementGuardedByLogCondition" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="LoggingConditionDisagreesWithLogStatement" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="NonStaticFinalLogger" enabled="true" level="WARNING" enabled_by_default="true">
<option name="loggerClassName" value="" />
</inspection_tool>
<inspection_tool class="PlaceholderCountMatchesArgumentCount" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="StringConcatenationArgumentToLogCall" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
\ No newline at end of file
......@@ -5,11 +5,12 @@
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
<option name="myNullables">
<value>
<list size="4">
<list size="5">
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
<item index="2" class="java.lang.String" itemvalue="javax.annotation.CheckForNull" />
<item index="3" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
<item index="4" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
</list>
</value>
</option>
......@@ -24,7 +25,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -47,6 +47,7 @@ public class C {
public static final String CONTENT_TYPE = "application/x-www-form-urlencoded";
public static final String CONTENT_LANGUAGE = "zh-cn";
public static final String CACHE_CONTROL = "no-cache";
public static final String ACCEPT_LANGUAGE = "zh-cn";
}
public final class API_BUILDER {
......@@ -79,7 +80,7 @@ public class C {
/**
* 地址
*/
public static final String BASE_URL = URL_TEST;
public static final String BASE_URL = URL_ONLINE;
private static final String PKG = "/tk/";
......@@ -669,7 +670,7 @@ public class C {
/**
* 当前支付系统
*/
public static final int CURRENT = PAX.APP;
public static final int CURRENT = PAX.API;
/**
* 浙星
......
......@@ -49,6 +49,7 @@ class Api {
.addHeader("Content-Type", C.HEAD.CONTENT_TYPE)
.addHeader("Content-Language", C.HEAD.CONTENT_LANGUAGE)
.addHeader("Cache-Control", C.HEAD.CACHE_CONTROL)
.addHeader("Accept-Language", C.HEAD.ACCEPT_LANGUAGE)
.build());
//COOKIE
......
......@@ -229,7 +229,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
* 订单的总成本
*/
@JSONField(serialize = false)
private long orderStock;
private long orderCost;
/**
* 使用的优惠卷ID
......@@ -284,14 +284,14 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
* @return 订单信息
*/
public Saleorder setSaledetails(List<Saledetail> mSaledetailList) {
orderAuthAmt = orderVipOffAmt = orderStock = 0L;
orderAuthAmt = orderVipOffAmt = orderCost = 0L;
orderCnt = 0;
//计算商品价格
for (int i = 0; i < mSaledetailList.size(); i++) {
this.orderCnt += mSaledetailList.get(i).getDetailCnt();
this.orderAuthAmt += mSaledetailList.get(i).getInitialDetailAmt();
this.orderVipOffAmt += mSaledetailList.get(i).getDetailAmt();
this.orderStock += mSaledetailList.get(i).getSkuStock();
this.orderCost += mSaledetailList.get(i).getSkuCost() * mSaledetailList.get(i).getDetailCnt();
}
//获取会员折扣价格
this.vipOffAmt = this.orderAuthAmt - this.orderVipOffAmt;
......@@ -418,7 +418,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
this.orderReduAmt = this.orderAuthAmt - this.orderPayAmt;
//获取订单利润
this.orderProfit = this.orderPayAmt - this.orderStock;
this.orderProfit = this.orderPayAmt - this.orderCost;
}
private Long id;
......@@ -512,12 +512,12 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
private List<Saledetail> saledetailList;
public long getOrderStock() {
return orderStock;
public long getOrderCost() {
return orderCost;
}
public void setOrderStock(long orderStock) {
this.orderStock = orderStock;
public void setOrderCost(long orderCost) {
this.orderCost = orderCost;
}
public long getTicketId() {
......@@ -931,7 +931,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
saleorder.orderCnt += mSaledetailList.get(i).getDetailCnt();
saleorder.orderAuthAmt += mSaledetailList.get(i).getInitialDetailAmt();
saleorder.orderPayAmt += mSaledetailList.get(i).getDetailAmt();
saleorder.orderStock += mSaledetailList.get(i).getSkuStock();
saleorder.orderCost += mSaledetailList.get(i).getSkuCost() * mSaledetailList.get(i).getDetailCnt();
}
//获取会员折扣价格
saleorder.vipOffAmt = saleorder.orderAuthAmt - saleorder.orderPayAmt;
......@@ -940,7 +940,7 @@ public class Saleorder extends SectionEntity<MediaStore.Video> implements BaseMo
//获取总优惠价格
saleorder.orderReduAmt = saleorder.orderAuthAmt - saleorder.orderPayAmt;
//获取订单利润
saleorder.orderProfit = saleorder.orderPayAmt - saleorder.orderStock;
saleorder.orderProfit = saleorder.orderPayAmt - saleorder.orderCost;
return saleorder;
}
......
......@@ -322,9 +322,10 @@ public class SsskuPresenter extends SsskuContract.Presenter {
mCompositeDisposable.add(
ApiFactory.Sssku.querySssku(mSearchPageNum, mKeyword)
.doOnSubscribe(subscription -> mView.dismissLoadingDialog())
.subscribe(ssskuPager -> mView.loadSearchResult(ssskuPager, mSearchPageNum == 1), throwable -> {
mView.showMsg(throwable.getMessage());
})
.subscribe(
ssskuPager -> mView.loadSearchResult(ssskuPager, mSearchPageNum == 1),
throwable -> mView.showMsg(throwable.getMessage())
)
);
}
......
......@@ -29,7 +29,7 @@ public class AddFragment extends BaseFragment<SsskuPresenter, FragmentSsskuAddBi
@Override
public void initView() {
mViewBinding.etBarcode.setOnEditorActionListener((textView, i, keyEvent) -> {
if (i == EditorInfo.IME_ACTION_SEARCH && !StringUtils.isEmpty(textView.getText())) {
if (i == EditorInfo.IME_ACTION_SEARCH && !StringUtils.isEmpty(textView.getText())) {
KeyboardUtils.hideSoftInput(textView);
mPresenter.clickCheck(textView.getText().toString());
}
......@@ -66,6 +66,7 @@ public class AddFragment extends BaseFragment<SsskuPresenter, FragmentSsskuAddBi
public void loadBarcode(String barcode) {
if (mViewBinding == null) return;
mViewBinding.etBarcode.setText(barcode);
mPresenter.clickCheck(barcode);
}
@Override
......
......@@ -5,7 +5,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "io.realm:realm-gradle-plugin:4.0.0"
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment